Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.9k views
in .NET FTP by (440 points)
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?

2 Answers

0 votes
by (161k points)
Have you tried modifying the demo code to use a FileAppender? That would be a good place to start
0 votes
by (440 points)
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!

Categories

...