Logging using NLog.Logger

Hello Community,

I am trying to improve our logging and I have found that NLog.Logger is a really great framework,

but somehow I can't see the logs created by the scripts (VB.NET Code) called by the processes.

Is there something I am missing here?

My code from an external custom script

Dim log As NLog.Logger = LogManager.GetLogger(LogNames.JobGenLog)
log.Debug("Log entry from JobGenLog logger")

globallog.config

<nlog autoReload="true" xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<targets>
		<default-wrapper xsi:type="AsyncWrapper" batchSize="1000" overflowAction="Block" timeToSleepBetweenBatches="0" />
		<target name="jobgenlogfileTmp" xsi:type="File" fileName="C:/OneIdentity/Log/${appName}_jobgen.log" layout="${layout}" encoding="utf-8"
			archiveFileName="C:/OneIdentity/Log/${appName}_jobgen.{#}.log" maxArchiveFiles="7" archiveEvery="Day" archiveNumbering="Rolling"/>		
	</targets>

	<rules>
		<logger name="JobGenLog" minlevel="Debug" writeTo="jobgenlogfileTmp"/>
	</rules>
</nlog>

I am able to see the generated logs by the processes, but not by the VB.Net custom scripts that the process is calling.

Any hints where or what to check?

Thank you!

Parents Reply
  • I have a process, which calls a custom script called "CCC_Test" in one of the steps

    From Object Browser I trigger the process sending an event.

    The XML provided is part of the globallog.config file.

    The goal is to have in one file both logs from the process (JobGenLog) and from the logs coming from the script.

Children
No Data