Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

After installing WIP by default log files are created in the WIP install directory i.e. <Install Directory>/Log.

For example in C:\ProgramData\ebiexperts\WIP Web Server\webapp\log

WIP1.0

...

WIP2.0

...

We can notify the application to write the log to another locationchange the location where the logs are saved.

To achieve we need to do the following:-

  • Stop all WIP service(s) actually running like

    • wipwebserver,

    • wiptrackerservice,

    • wipsapservice and

    • wipprocessorservice

  • Edit  the file called NLog.config  in an editor like Notepad ++.

  • The NLog.config   is found in the following directory

    • For WIP1.0 - C:\ProgramData\ebiexperts\WIP Web Server\webapp

    • For WIP2.0 - C:\ProgramData\ebiexperts\WIP Web Server2\wipsetup

  • Look for the <variable name="logDir" value="C:\TstLog" />.

    • If the line is not found add the line below variable name="myvar". 

    • The lines in the config file should look as follows :-

       <variable name="myvar" value="myvalue" />

      <variable name="logDir" value="C:\TstLog" />

       Change the value of the “logDir” to the desired value

    • Image Added

  • Look for the variable basedir in the current config file and replace it with the variable logDir created from step 2 and 3.

  • Example : The “basedir” below will be replace ="logDir"

<target name="file" xsi:type="File"

            fileName="${basedir}/log/${lowercase:${processname}/${processname}}_${date:format=yyyy-MM-dd}-api.log"

            encoding="utf-8" layout="${longdate} ${uppercase:${level}} ${processid} ${message}"

            maxArchiveFiles="4"

            archiveEvery="Day" />

    <target name="console" xsi:type="Console"

            encoding="utf-8" layout="${longdate} ${callsite} ${level} ${message}" />

  </targets>

  •  The config should look like that :

 <target name="file" xsi:type="File"

            fileName="${logDir}/log/${lowercase:${processname}/${processname}}_${date:format=yyyy-MM-dd}-api.log"

            encoding="utf-8" layout="${longdate} ${uppercase:${level}} ${processid} ${message}"

            maxArchiveFiles="4"

            archiveEvery="Day" />

    <target name="console" xsi:type="Console"

            encoding="utf-8" layout="${longdate} ${callsite} ${level} ${message}" />

  • Restart all the services

  •  WIP will now write log to the newly specified location.

...