﻿<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
    <section name="system.data.localdb" type="System.Data.LocalDBConfigurationSection,System.Data,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"/>
    <section name="activeDirCacheConfig" type="Seagull.Framework.ActiveDirectory.ActiveDirCacheConfigurationSection, Seagull.Framework" />
  </configSections>
  <!--<serviceConfig MaxPendingChannels="400" />-->
  <!--<activeDirCacheConfig />-->
  <system.data.localdb>
    <localdbinstances>
       <!--Create SQL Server 2014 Express LocalDB instance -->
       <add name="BarTenderLicensingDB120" version="12.0" />
    </localdbinstances>
  </system.data.localdb>
  <connectionStrings>
    <!--The LocalDb instance's name should be the same as configured in system.data.localdb -->
    <add name="LicensingServerDbContext"
         connectionString="Data Source=(LocalDB)\BarTenderLicensingDB120;Initial Catalog=LicensingService;AttachDbFilename=|DataDirectory|\LicensingServiceDb.mdf;Integrated Security=True"
         providerName="System.Data.SqlClient" />
  </connectionStrings>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
      </dependentAssembly>
    </assemblyBinding>
    <generatePublisherEvidence enabled="false" />
  </runtime>
  <!-- .NET Framework to use -->
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
  </startup>
  <!-- Log Configuration -->
  <!--internalLogFile="c:\Nlog.txt" internalLogLevel="Trace"-->
  <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <targets>
      <!--Configure File Log Targets-->
      <target name="All" xsi:type="AsyncWrapper">
        <target name="logfile" xsi:type="File" fileName="${specialfolder:folder=CommonApplicationData}\Seagull\Services\Logging\Licensing.Service.txt" layout="${date:format=yyyy.MM.dd.HHmmss}: ${pad:padding=7:inner=${level}}: ${message}" archiveFileName="${specialfolder:folder=CommonApplicationData}\Seagull\Services\Logging\Archive\Licensing.Service.{#}.txt" archiveEvery="Day" archiveNumbering="Rolling" maxArchiveFiles="7" />
      </target>
      <!--Configure Colored Console Targets-->
      <target name="Console" xsi:type="ColoredConsole" useDefaultRowHighlightingRules="false" layout="${pad:padding=7:inner=${level}}: ${message}">
        <highlight-row condition="level == LogLevel.Debug" foregroundColor="DarkGray" />
        <highlight-row condition="level == LogLevel.Trace" foregroundColor="Gray" />
        <highlight-row condition="level == LogLevel.Info" foregroundColor="White" />
        <highlight-row condition="level == LogLevel.Warn" foregroundColor="Yellow" />
        <highlight-row condition="level == LogLevel.Error" foregroundColor="Red" />
        <highlight-row condition="level == LogLevel.Fatal" foregroundColor="Red" backgroundColor="White" />
      </target>
      </targets>
      <!--Configure logger rules.-->
      <rules>
         <!--<logger name="*" minlevel="Info" writeTo="All" />-->
         <logger name="*" minlevel="Info" writeTo="All" />
         <logger name="*" minlevel="Info" writeTo="Console" />
      </rules>
   </nlog>
</configuration>
