cancel
Showing results for 
Search instead for 
Did you mean: 

Creating JSON or XML files in Diagnostic Service in EP5

Joseph_Miller
Confirmed Champ
Confirmed Champ

Good Morning;

I am trying to setup Diagnostics to create JSON or XML output files so they can be viewed in Diagnostic Console.

I added a key in the Web.config for my Applications server where the MRG stated to add it at:

Add Key “File” value=”D:\Hyland\Logging\log.json”

However, when I try and view the file in Diagnostic Console I receive the following error message:

JSON file: Error Reading File Format of JSON file not understood

XML file: Error Reading File Data at the root level is invalid. Line 1, Position 1

I am sure I am missing something else from the MRG that I did not see.

Any help would be greatly appreciated.

1 ACCEPTED ANSWER

AdamShaneHyland
Employee
Employee

Hi @Joseph Miller ,

 

With OnBase Foundation EP1 and higher we started to use a new method for logging called Hyland.Logging for diagnostics logging from the various OnBase (and related such as Hyland IDP) components.  This changed the way logging is enabled and provided new features.  There are some differences between the settings used depending on the version you are using.

 

  • OnBase Foundation EP3 - Hyland.Logging 12
<Route name="FileRoute">  <add key="minimum-level" value="Trace" />  <add key="File" value="C:\Path\To\Folder\webServer.log" />  <add key="write-to:Console.formatter" value="Hyland.Logging.Serilog.HylandCompactJsonFormatter, Hyland.Logging" />  <add key="write-to:File.rollingInterval" value="Infinite" />  <add key="write-to:File.rollOnFileSizeLimit" value="true" />  <add key="write-to:File.retainedFileCountLimit" value="5" />  <add key="write-to:File.fileSizeLimitBytes" value="10000" /></Route>

 

  • OnBase Foundation EP5 and higher - Hyland.Logging 14
<Route name="FileRoute">  <add key="minimum-level" value="Trace" />  <add key="File" value="C:\Path\To\Folder\webServer.log" />  <add key="OutputFormat" value="JSON" />  <add key="FileRollOnSize" />  <add key="FileRollInterval" value="Infinite" />  <add key="FileCountLimit" value="5" />  <add key="FileByteLimit" value="10000" /></Route>

 

Reference the Hyland Diagnostics MRG and/or the component MRG (e.g. Application Server) for more information on specifics based on the version of the software you are running.

 

Take care.

View answer in original post

3 REPLIES 3

AdamShaneHyland
Employee
Employee

Hi @Joseph Miller ,

 

With OnBase Foundation EP1 and higher we started to use a new method for logging called Hyland.Logging for diagnostics logging from the various OnBase (and related such as Hyland IDP) components.  This changed the way logging is enabled and provided new features.  There are some differences between the settings used depending on the version you are using.

 

  • OnBase Foundation EP3 - Hyland.Logging 12
<Route name="FileRoute">  <add key="minimum-level" value="Trace" />  <add key="File" value="C:\Path\To\Folder\webServer.log" />  <add key="write-to:Console.formatter" value="Hyland.Logging.Serilog.HylandCompactJsonFormatter, Hyland.Logging" />  <add key="write-to:File.rollingInterval" value="Infinite" />  <add key="write-to:File.rollOnFileSizeLimit" value="true" />  <add key="write-to:File.retainedFileCountLimit" value="5" />  <add key="write-to:File.fileSizeLimitBytes" value="10000" /></Route>

 

  • OnBase Foundation EP5 and higher - Hyland.Logging 14
<Route name="FileRoute">  <add key="minimum-level" value="Trace" />  <add key="File" value="C:\Path\To\Folder\webServer.log" />  <add key="OutputFormat" value="JSON" />  <add key="FileRollOnSize" />  <add key="FileRollInterval" value="Infinite" />  <add key="FileCountLimit" value="5" />  <add key="FileByteLimit" value="10000" /></Route>

 

Reference the Hyland Diagnostics MRG and/or the component MRG (e.g. Application Server) for more information on specifics based on the version of the software you are running.

 

Take care.

Joseph_Miller
Confirmed Champ
Confirmed Champ

Thanks Adam. I will look into this.

Joe

No problem.  Good luck.