Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a plan to support for XML configuration? #64

Open
faridprogrammer opened this issue Dec 13, 2020 · 5 comments
Open

Is there a plan to support for XML configuration? #64

faridprogrammer opened this issue Dec 13, 2020 · 5 comments

Comments

@faridprogrammer
Copy link

Hi all.

I have noticed in the readme file which the XML configuration is not supported in this wrapper.
Any work hasn't done yet to support XML configuration?

Is there a plan to do it?

Thanks.

@faridprogrammer faridprogrammer changed the title Is there support for XML configuration? Is there a plan to support for XML configuration? Dec 13, 2020
@nblumhardt
Copy link
Member

Hi Farid! No, not anything planned currently that I know of.

Best regards,
Nick

@faridprogrammer
Copy link
Author

faridprogrammer commented Dec 15, 2020

Do you have any suggestions that can guide me through implementing XML configuration support? To see if I can implement it myself or not.

@HunteRoi
Copy link

HunteRoi commented Apr 6, 2022

Hey there! It's been 2 years since the OP asked about this feature. Do you have any update for it please? Thanks!

@nblumhardt
Copy link
Member

@HunteRoi no, no updates.

@DavidMartynWood
Copy link

I tried this out and it seems to work, except I have to add a null WriteTo to force the configuration to load successfully, here's an example.

<configuration>
  <Serilog>
    <MinimumLevel>
      <Default>Verbose</Default>
      <Override>
        <Microsoft>Warning</Microsoft>
      </Override>
    </MinimumLevel>
    <WriteTo>
      <Name>Async</Name>
      <Args>
        <configure>
          <Name>Console</Name>
          <Args>
            <outputTemplate>{Timestamp:yyyy-MM-dd HH:mm:ss.fffff} [{ThreadId,6}] {Level,11}: {Message:l}{NewLine}{Exception}</outputTemplate>
            <restrictedToMinimumLevel>Verbose</restrictedToMinimumLevel>
          </Args>
        </configure>
        <configure>
          <Name>File</Name>
          <Args>
            <path>%ALLUSERSPROFILE%/Company/App/Logs/Radio/App/app-.log</path>
            <fileSizeLimitBytes>5242880</fileSizeLimitBytes>
            <rollOnFileSizeLimit>true</rollOnFileSizeLimit>
            <rollingInterval>Day</rollingInterval>
            <retainedFileCountLimit>15</retainedFileCountLimit>
            <outputTemplate>{UtcTimestamp:yyyy-MM-dd HH:mm:ss.fffff}Z|{Timestamp:yyyy-MM-dd HH:mm:ss.fffff} [{ThreadId,6}] {Level,11}: {Message:l}{NewLine}{Exception}</outputTemplate>
            <restrictedToMinimumLevel>Verbose</restrictedToMinimumLevel>
          </Args>
        </configure>
      </Args>
    </WriteTo>
    <WriteTo>
      <Name>null</Name>
    </WriteTo>
  </Serilog>
</configuration>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants