Return-Path: X-Original-To: apmail-logging-log4net-user-archive@www.apache.org Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4FD1F177AA for ; Wed, 7 Jan 2015 13:14:27 +0000 (UTC) Received: (qmail 23632 invoked by uid 500); 7 Jan 2015 13:14:27 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 23589 invoked by uid 500); 7 Jan 2015 13:14:27 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 23579 invoked by uid 99); 7 Jan 2015 13:14:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 13:14:27 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dpsenner@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2015 13:14:00 +0000 Received: by mail-we0-f172.google.com with SMTP id k11so1151478wes.3 for ; Wed, 07 Jan 2015 05:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:thread-index:content-language; bh=IEKXbTDj17fIg7mesY3GdzlfMODkpdvhnYnW1SXixUM=; b=aY7uTJ8QGVxPJ5KLmxTesZdExNx972aJv95f5VX/GeSdyUfSPWBhA1esIdhd5E/AHE 6x1aTbwAvQPI3aZq4Wjd+j5q9WPqIIsm8rtt+y95gctBTeEIl4ydiDrBrAmmJWKLOFJF owC/hdfwss09uenoflNlbCCVaJNVDBxB4M1POJLstH5Qdzxyos1/FgnkfyqwC/Rx1Fap RbALbvT75LOvnTGFA8s7N5H9AfCwl/ZJz21W5Cxo6+s4BEe9vKWh734Xf/4Gpa+P0QRX 2x/7Evb4rtXtgl9AeBWEXOEmBPQkDVUOLjJ2mvWgcfc22/UOlRkKLfpM1Dup1beKLbdb toJQ== X-Received: by 10.180.198.51 with SMTP id iz19mr7099913wic.65.1420636439212; Wed, 07 Jan 2015 05:13:59 -0800 (PST) Received: from NBSW003 (etrn.topcontrol.it. [217.199.15.225]) by mx.google.com with ESMTPSA id f1sm2091460wjw.30.2015.01.07.05.13.58 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Jan 2015 05:13:58 -0800 (PST) From: "Dominik Psenner" To: "'Log4NET User'" References: <017601d02a72$5b749630$125dc290$@gmail.com> In-Reply-To: Subject: AW: [External] AW: Log4Net RollingFileAppender not adding Custom property in Win8/VS2013 Date: Wed, 7 Jan 2015 14:13:56 +0100 Message-ID: <018701d02a7b$cb6ac320$62404960$@gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0188_01D02A84.2D35E1E0" X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQJdqHF2p+jZsEM3Uae72fH71HomaAFPO5qRAYgNG9GbguokAA== Content-Language: de-at X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_0188_01D02A84.2D35E1E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Given that you=92ve already enabled and checked log4net=92s internal = debug logs, would you mind sharing these logs with us? The next best bet I can come = up with is that you step through the application with the debugger right = from the point where you set up the property and invoke log4net.Config.XmlConfigurator.Configure(). You could even step through = a second instance that runs on win7 at the same time. This way you would literally see where the instances branch. =20 Cheers =20 Von: Goyal, Nitin UTAS [mailto:Nitin.Goyal@utas.utc.com]=20 Gesendet: Mittwoch, 07. J=E4nner 2015 13:57 An: Log4NET User Cc: nitinkumgoyal@gmail.com Betreff: RE: [External] AW: Log4Net RollingFileAppender not adding = Custom property in Win8/VS2013 =20 Thanks =20 I have checked all this stuff and this all working in Win7 perfectly. =20 The only issue is when I try to run the same code on Win8 with VS2013 = and it don=92t use that property and create alone the file name as the datetime = and not the static value I have added. It=92s very surprising and I am = banging my head what changes are doing this to happen. :/ =20 Regards Nitin =20 From: Dominik Psenner [mailto:dpsenner@gmail.com]=20 Sent: 07 January 2015 17:36 To: 'Log4NET User' Cc: nitinkumgoyal@gmail.com =20 Subject: [External] AW: Log4Net RollingFileAppender not adding Custom property in Win8/VS2013 =20 Howdie, =20 Here=92s a list of things that you could check: =20 * First of all enable log4net=92s internal debug logging, it may = give you a clue what he is doing * Make sure to call log4net.Config.XmlConfigurator.Configure() = after setting the property * Escape path separators properly * Specify the rolling style to be used =20 Beware that using a patternstring for the file property of a rollingfileappender is a hot hack and you might get burned as soon as rolling jumps in! =20 Cheers =20 Von: Goyal, Nitin UTAS [mailto:Nitin.Goyal@utas.utc.com]=20 Gesendet: Mittwoch, 07. J=E4nner 2015 11:23 An: log4net-user@logging.apache.org = Cc: nitinkumgoyal@gmail.com =20 Betreff: Log4Net RollingFileAppender not adding Custom property in Win8/VS2013 =20 Hi All I am creating a custom property in Log4Net with Visual Studio 2010 on = Win7 and it is able to create everything well with the correct property. But = If i try to run the same program on Win8 and Visual Studio 2013, it do create = the log file but without the custom property. I have not edited anything and same thing is working in WIn7 but not in Win8.=20 I don't know what is changing in both of these environments. Can anyone = give hint at what to look for?
=20 I am setting the property in the code as following which is working correctly in WIn7 but not in Win8 where I have just updated the Visual studio as version 2013 with 2010: string LogName =3D "TSAS_DRU_Log_" + date + ".csv"; log4net.GlobalContext.Properties["LogName"] =3D LogName; =20 =20 Nitin Goyal =96 Technical Lead, Software =96 Sensors & Integrated = Systems UTC AEROSPACE SYSTEMS Netra Tech Park, Old Plot No.181, New Plot No. 40, EPIP Industrial Area, Part of Sy.No.28, Kundalahalli Village, Krishnaraja Puram Hobli, = Bangalore 560 066, Karnataka, India Tel: +91 80 673 80262 Mobile: +91 9886295724 Fax: +91 80 673 80005 nitin.goyal@utas.utc.com www.utcaerospacesystems.com =20 =20 CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of UTC Aerospace Systems and its affiliated companies. If you are not the intended recipient, please 1) do not disclose, copy, distribute or use this message or its contents, 2) = advise the sender by return e-mail, and 3) delete all copies (including all attachments) from your computer. Your cooperation is greatly = appreciated. =20 ------=_NextPart_000_0188_01D02A84.2D35E1E0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Given that you’ve already enabled and = checked log4net’s internal debug logs, would you mind sharing = these logs with us? The next best bet I can come up with is that you = step through the application with the debugger right from the point = where you set up the property and invoke log4net.Config.XmlConfigurator.Configure(). You = could even step through a second instance that runs on win7 at the same = time. This way you would literally see where the instances = branch.

 

Cheers

 

Von: Goyal, Nitin UTAS = [mailto:Nitin.Goyal@utas.utc.com]
Gesendet: Mittwoch, 07. = J=E4nner 2015 13:57
An: Log4NET User
Cc: = nitinkumgoyal@gmail.com
Betreff: RE: [External] AW: Log4Net = RollingFileAppender not adding Custom property in = Win8/VS2013

 

Thanks

 

I have checked all this stuff and = this all working in Win7 perfectly.

 

The only issue is when I try to run = the same code on Win8 with VS2013 and it don’t use that property = and create alone the file name as the datetime and not the static value = I have added. It’s very surprising and I am banging my head what = changes are doing this to happen. :/

 

Regards
Nitin

 

From: Dominik Psenner [mailto:dpsenner@gmail.com] =
Sent: 07 January 2015 17:36
To: 'Log4NET = User'
Cc: nitinkumgoyal@gmail.com
Subject: [External] AW: Log4Net RollingFileAppender not adding = Custom property in Win8/VS2013

 

Howdie,

 

Here’s a list of things that you could = check:

 

=B7       &nb= sp; First of all enable = log4net’s internal debug logging, it may give you a clue what he = is doing

=B7       &nb= sp; Make sure to call = log4net.Config.XmlConfigurator.Configure() after setting the = property

=B7       &nb= sp; Escape path separators = properly

=B7       &nb= sp; Specify the rolling style to be = used

 

Beware that using a patternstring for  the = file property of a rollingfileappender is a hot hack and you might get = burned as soon as rolling jumps in!

 

Cheers

 

Von: Goyal, Nitin UTAS [mailto:Nitin.Goyal@utas.utc.com<= /a>]
Gesendet: Mittwoch, 07. J=E4nner 2015 = 11:23
An:
log4net-user@logging.apac= he.org
Cc: nitinkumgoyal@gmail.com
Betreff: Log4Net RollingFileAppender not adding Custom property in = Win8/VS2013

 

Hi All

I am creating a custom property = in Log4Net with Visual Studio 2010 on Win7 and it is able to create = everything well with the correct property. But If i try to run the same = program on Win8 and Visual Studio 2013, it do create the log file but = without the custom property.

I have not edited anything and = same thing is working in WIn7 but not in Win8.

I don't know what is changing = in both of these environments. Can anyone give hint at what to look = for?

<?xml version=3D"1.0" = encoding=3D"utf-8" ?>

<configuration>

  = <configSections>

    <section = name=3D"log4net"     = type=3D"log4net.Config.Log4NetConfigurationSectionHandler,log4net&qu= ot; />

  = </configSections>

  <log4net>

  <appender = name=3D"CsvFileAppender" = type=3D"log4net.Appender.RollingFileAppender,log4net">

    <file = type=3D"log4net.Util.PatternString" = value=3D"C:\TSAS_DRU_Log\%property{LogName}" />

    <appendToFile = value=3D"true"/>

    = <maxSizeRollBackups value=3D"10"/>

    <maximumFileSize = value=3D"100MB"/>

    = <staticLogFileName value=3D"true"/>

    <layout = type=3D"TSAS_DRU_app.CsvPatternLayout, = TSAS_DRU_app">

    = </layout>

  </appender>

  <root>

    <level = value=3D"DEBUG" />

    <appender-ref = ref=3D"CsvFileAppender" />

  </root>

</log4net>

  = </configuration>

 

I am setting the property in = the code as following which is working correctly in WIn7 but not in Win8 = where I have just updated the Visual studio as version 2013 with = 2010:

string LogName =3D = "TSAS_DRU_Log_" + date + ".csv";

    = log4net.GlobalContext.Properties["LogName"] =3D = LogName;

 

 

Nitin Goyal – Technical Lead, Software – Sensors & Integrated = Systems

UTC AEROSPACE SYSTEMS

Netra Tech Park, Old Plot No.181, New Plot No. = 40, EPIP Industrial Area, Part of Sy.No.28, Kundalahalli Village, = Krishnaraja Puram Hobli, Bangalore 560 066, Karnataka, India

Tel: +91 80 673 80262  = Mobile: +91 9886295724  Fax: +91 80 673 80005

nitin.goyal@utas.utc.com=     www.utcaerospacesystems.com<= /a>

 

CONFIDENTIALITY WARNING:  This message may = contain proprietary and/or privileged information of UTC Aerospace = Systems and its affiliated companies.  If you are not the intended = recipient, please 1) do not disclose, copy, distribute or use this = message or its contents, 2) advise the sender by return e-mail, and 3) = delete all copies (including all attachments) from your computer.  = Your cooperation is greatly appreciated.

 

------=_NextPart_000_0188_01D02A84.2D35E1E0--