Skip to content

How to use with Unity

Rajesh Soni edited this page Jun 1, 2019 · 2 revisions

Hi ,

below is configurations for app.config.


`

<alias alias="ILogger" type="rsoni.LogManager.ILogger, rsoni.LogManager" />

<alias alias="AppInsightLogger" type="rsoni.LogManager.AppInsightLogger, rsoni.LogManager" />

<alias alias="FileLogger" type="rsoni.LogManager.FileLogger, rsoni.LogManager" />

<alias alias="CSVLogger" type="rsoni.LogManager.CSVLogger, rsoni.LogManager" />

<assembly name="rsoni.LogManager.Test" />

<namespace name="rsoni.LogManager.Test" />

<containers>

  <container name="Others">

    <register name="alogger" type="ILogger" mapTo="AppInsightLogger">

      <lifetime type="singleton" />

      <constructor>

        <param name="instrumentationKey" value="aaaaa" />

        <param name="logError" value="true" />

        <param name="logInfo" value="true" />

        <param name="logWarning" value="true" />

        <param name="logTrack" value="true" />

      </constructor>

    </register>

    <register name="flogger" type="ILogger" mapTo="FileLogger">

      <lifetime type="singleton" />

      <constructor>

        <param name="logName" value="Testlog" />

      </constructor>

    </register>

    <register name="f1logger" type="ILogger" mapTo="FileLogger">

      <lifetime type="singleton" />

      <constructor>

        <param name="configuration" value="configuration" />

      </constructor>

    </register>

    <register name="clogger" type="ILogger" mapTo="CSVLogger">

      <lifetime type="singleton" />

      <constructor>

        <param name="logName" value="Testlog" />

      </constructor>

    </register>

  </container>

</containers>

`

Clone this wiki locally