Click here to Skip to main content
15,359,389 members
Home / Discussions / C#
   

C#

 
GeneralRe: Button navigate Pin
Texas38930-Sep-09 11:10
MemberTexas38930-Sep-09 11:10 
QuestionProblem executing a named pipe service Pin
AndyASPVB30-Sep-09 8:55
MemberAndyASPVB30-Sep-09 8:55 
AnswerRe: Problem executing a named pipe service Pin
Ian Shlasko30-Sep-09 9:26
MemberIan Shlasko30-Sep-09 9:26 
GeneralRe: Problem executing a named pipe service Pin
AndyASPVB30-Sep-09 9:51
MemberAndyASPVB30-Sep-09 9:51 
GeneralRe: Problem executing a named pipe service Pin
saber.softs30-Sep-09 11:02
Membersaber.softs30-Sep-09 11:02 
GeneralRe: Problem executing a named pipe service Pin
AndyASPVB1-Oct-09 10:43
MemberAndyASPVB1-Oct-09 10:43 
QuestionLoadLibrary gets stuck when calling it from a thread that is not the main thread Pin
Alexeirob30-Sep-09 7:50
MemberAlexeirob30-Sep-09 7:50 
QuestionMultiple log4net files. Pin
Albu Marius30-Sep-09 5:00
MemberAlbu Marius30-Sep-09 5:00 
I have a problem regarding multiple log files. In my project i have a GeneralLog (singleton instance) that is configured from the app.config of the application.
<log4net>
		<!-- The DebugFileAppender writes all messages to a log file-->
		<appender name="GeneralAppender" type="log4net.Appender.FileAppender">
			<!-->the file where to write the events<-->
			<file value="GeneralLog.dat" />
			<!-->the lowest level a message must reach in order to get written in the log file<-->
			<threshold value="WARN" />
			<!-->a value indicating that every message is appended to the log file<-->
			<appendToFile value="true" />
			<maximumFileSize value="100KB"/>
			<rollingStyle value="Size"/>
			<!-->the message layout<-->
			<layout type="log4net.Layout.PatternLayout">
				<param name="ConversionPattern" value="[%d] - %m%n" />
			</layout>
		</appender>
		<root>
			<!-- add other appenders here and the log messages will be sent to every listed appender -->
			<appender-ref ref="GeneralAppender" />
		</root>
	</log4net>

This works. During the execution I create alot more (dynamically) log files from appenders defined like this:
FileAppender generalLogAppender = new FileAppender();
//Initialize the properties of the appender
generalLogAppender.Name = generalLogFileName;
generalLogAppender.File = "Log+"+ fileName + ".dat";
generalLogAppender.AppendToFile = true;
generalLogAppender.Threshold = Level.Warn;
PatternLayout layout2 = new PatternLayout();
layout2.ConversionPattern = "[%d] - %m%n";
layout2.ActivateOptions();
generalLogAppender.ActivateOptions();
BasicConfigurator.Configure(generalLogAppender);

The files are created, but nothing is written in them, only in the GeneralLog. I am really confused by this. I checked the net and of course CodeProject and found only static examples of logs, never a mixed case.

I am fighting against the Universe...
Reference-Rick Cook

AnswerRe: Multiple log4net files. Pin
Albu Marius1-Oct-09 0:28
MemberAlbu Marius1-Oct-09 0:28 
QuestionThe underlying provider failed on Open Pin
abbd30-Sep-09 4:23
Memberabbd30-Sep-09 4:23 
AnswerRe: The underlying provider failed on Open Pin
Matt Meyer30-Sep-09 5:26
MemberMatt Meyer30-Sep-09 5:26 
QuestionRe: The underlying provider failed on Open Pin
abbd30-Sep-09 6:20
Memberabbd30-Sep-09 6:20 
AnswerRe: The underlying provider failed on Open Pin
Not Active30-Sep-09 6:42
mentorNot Active30-Sep-09 6:42 
AnswerRe: The underlying provider failed on Open Pin
Max Paulousky24-Oct-09 11:10
MemberMax Paulousky24-Oct-09 11:10 
QuestionPDF is not shown in Windows Form Pin
Abdul Rahman Hamidy30-Sep-09 4:13
MemberAbdul Rahman Hamidy30-Sep-09 4:13 
QuestionEvent Trigger Pin
eyalle30-Sep-09 4:00
Membereyalle30-Sep-09 4:00 
AnswerRe: Event Trigger Pin
Md. Marufuzzaman30-Sep-09 5:46
professionalMd. Marufuzzaman30-Sep-09 5:46 
QuestionRegistry problem with 64-bit Vista Pin
Sifar - 030-Sep-09 3:53
MemberSifar - 030-Sep-09 3:53 
AnswerRe: Registry problem with 64-bit Vista Pin
monstale30-Sep-09 4:16
Membermonstale30-Sep-09 4:16 
Questionhow to use Update command from tableadapter Pin
kalevikas30-Sep-09 3:49
Memberkalevikas30-Sep-09 3:49 
AnswerRe: how to use Update command from tableadapter Pin
Henry Minute30-Sep-09 6:02
MemberHenry Minute30-Sep-09 6:02 
QuestionHow can i let the user insert a new values into a combobox inside of datagridview Pin
bonzaiholding30-Sep-09 3:27
Memberbonzaiholding30-Sep-09 3:27 
QuestionWhy Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 3:02
MemberHamid Khezeli30-Sep-09 3:02 
AnswerRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Luc Pattyn30-Sep-09 3:19
sitebuilderLuc Pattyn30-Sep-09 3:19 
GeneralRe: Why Don't Change Server Time? (Please Help, It is very urgent) Pin
Hamid Khezeli30-Sep-09 3:54
MemberHamid Khezeli30-Sep-09 3:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.