Discuss (FTP), (FTP on .NET CF) and (FTPS, SFTP and SCP).

FileAppender issue.

no avatar
User

sfbell

Posts

10

Joined

Sun May 09, 2004 2:20 pm

Location

South Central...PA that is

FileAppender issue.

by sfbell » Wed Jan 12, 2005 2:00 am

Hello,

I can't seem to get the fileappender working. When the application runs, it creates the empty log file in the proper directory. But nothing gets posted to it.. Here is the code that builds the logger.

using EnterpriseDT.Util.Debug;
using EnterpriseDT.Net.Ftp;

namespace pTrackerAdmin
{
class MainClass
{

public static void Main(string[] args)
{

Logger.AddAppender(new FileAppender(@"d:\adportal\tracker\pTrack.log"));
Logger log = Logger.GetLogger(typeof(MainClass));

Console.WriteLine("Hello World!");
Check_database(log);
}

public static void Check_database(Logger log){
log.Info("Current time: " + dt);
......
Debugger shows:
WARNING: 'edtftp.log.level' not found or invalid - logging switched off

I did have a config file with the add key="edtftp.log.level and value= info set, but then tried the straight: Logger.CurrentLevel = Level.INFO

Any suggestions?
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: FileAppender issue.

by support2 » Wed Jan 12, 2005 7:49 am

Have you tried modifying the demo code to use a FileAppender? That would be a good place to start
no avatar
User

sfbell

Posts

10

Joined

Sun May 09, 2004 2:20 pm

Location

South Central...PA that is

Modified demo. Better success..

by sfbell » Wed Jan 12, 2005 1:39 pm

Hello, I modified the demo as suggestd, and on my home computer the file appender worked properly. With some random strangeness while using the demo.exe.config file. Like setting log level to debug, and then error level didn't show up. I will continue to try different things out.

Thanks!

Who is online

Users browsing this forum: No registered users and 11 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron