View Issue Details

IDProjectCategoryView StatusLast Update
0002327unrealircdpublic2005-02-12 19:51
Reporterw00t Assigned Tosyzop  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Fixed in Version3.2.3 
Summary0002327: Logging important events without log{}
DescriptionIs it at all possible to change the logging a bit, so important events (such as startup failures) are always logged, regardless of the log block settings?

I've seen too many of these kind of conversations lately:
<+tehuser> Taking it out of service mode didn't help (wircd.exe exited immediately).
<+w00t> now check your log
<+w00t> wait, do you have a log {} block in your configuration file?
<+tehuser> No, I don't.
<+w00t> you need one
<+w00t> otherwise you can't see whats going wrong
<+tehuser> Ah, in that case, I'll return after I've crafted said block and have more information.
TagsNo tags attached.
3rd party modules

Relationships

related to 0002339 closedsyzop Win32: Logging stuff to eventlog 

Activities

Stealth

2005-02-10 14:04

reporter   ~0009062

Sounds like a good idea, but...

1) What about people like me who have a log for each type of event (errors, oper stuff, connections)?

2) What happens if someone makes a log block with the same logfile and puts the errors flag on it?

I think perhaps something like this should be left the way it is. When people mention they do not have a log block and they are wondering why they cannot get an error out of it, "RTFM" comes to mind.

Instead of forcing the log, there are other ways of doing this. The documentation can have the log block listed as Recommended instad of Optional. I would say Unreal should require an errors log, but how would users know without an error :P

aquanight

2005-02-10 15:43

reporter   ~0009063

Don't startup errors get logged to ircd.log / service.log anyway?

w00t

2005-02-10 22:33

reporter   ~0009064

Bugz: Exactly, they aren't told these things :/ which isn't a good thing imho.

aquanight: i would have thought so, haven't tried personally, but by the number of n00bs that have been having problems with this (3 in the past 2 days) i'd say either they don't, or it isnt working.

Stealth

2005-02-10 22:58

reporter   ~0009067

I believe Windows logs startup errors to service.log ONLY when it is a service, which obviously, doesn't apply to *NIX and Windows non-service.

syzop

2005-02-10 23:00

administrator   ~0009068

I agree on this, IMO errors should still be logged to ircd.log if there's no log block present (and indeed, this does not happen if you have no log { } block [something I experienced various times]).
Now question is, which Bugz brings up, what would happen if a log { } block is present, if then this build-in-default should go away or not.
We could go as crazy as to check if errors are logged in ANY log block, and if not.. still use the default, unless a log block for ircd.log exists....
Then again, this is becoming a bit crazy :)
Another option is of course to print out some kind of warning if no log { } block exists that logs error, that also seems more educational than doing black magic :)

crazy

2005-02-11 01:34

reporter   ~0009070

hmm ..

why not an startup.log (or something) to log errors on start / restart /rehash .. and just fobid (if is posible ) to set the name of the log in the log { } block / s ..

1) What about people like me who have a log for each type of event (errors, oper stuff, connections)? <--- well then you have a few KBs more on your HD :P

w00t

2005-02-11 07:19

reporter   ~0009074

What about a new category of error that gets logged regardless of whether it's in your log{} block? ie: START_ERROR, CONF_ERROR... whatever.

codemastr

2005-02-11 12:40

reporter   ~0009080

Well I suppose we could include a "default" log block. Like:

if (no_log_blocks_found) create_log_block("ircd.log", "errors");

Stealth

2005-02-11 17:54

reporter   ~0009084

I like what codemastr said about default log block...

But what Syzop said was nice too, perhaps the start script can look for a log block in unrealircd.conf and print an error that says something like "IRCd seemingly not started, and there have been no log blocks found. Please create a log block"

w00t

2005-02-12 02:15

reporter   ~0009087

Maybe both?

Because, if you think about it, if it's running as a service under windows, you WONT SEE THE ERROR!... :p

So, if it creates a default log block, then tells you that you're a moron, all will be well.

skyflash

2005-02-12 05:50

reporter   ~0009088

Also, as I experienced with the bug I posted, there are times when startup problems aren't logged at all on services. Normally, on Windows the startup problem should be logged to the Event Logger, because you cannot be sure that the IRCD is even able to write to any log file.

Of course, if that is feasible or possible with wircd i cannot say.

But I know that for my problem there never would have been any logging, because the ircd started up in %windir%/system32. That dir usually is not writable for a non-priv account, so there never would have been any logging, default log block or not. :P

And as the ircd never switched to its working dir, it of course also didn't find the unrealircd.conf, so there was no config loaded. And it had no way of telling me, so I had to find it all out by myself.

Feature Request: On windows, log startup problems to the EventLog. ;)

w00t

2005-02-12 06:52

reporter   ~0009089

Skyflash, had you READ my latest post, you will have noticed I already said that.

On the other note, this thread is NOT about your windows startup issue. :p

skyflash

2005-02-12 07:24

reporter   ~0009090

You didn't talk at all about using the Windows NT/2000/2003 Event Log system.... you talked about config files and log files...
I am talking about the EVENT LOG that only exists on Windows, and which can be logged to regardless of user account permissions.

:)

Also, this partly IS a bug that deals with my problem. If it had better logging I could maybe find out WHY it does not set the working dir correctly, but as it is I can only write a bug report and hope for the best... ;)

w00t

2005-02-12 07:35

reporter   ~0009091

...aaargh.

codemastr

2005-02-12 13:16

reporter   ~0009103

[quote]Normally, on Windows the startup problem should be logged to the Event Logger, because you cannot be sure that the IRCD is even able to write to any log file.[/quote]
I would like to use the event logger. Unfortunately, MS makes it as difficult as possible! It's not really designed for "just display any text" type messages, it is more designed for a fixed set of messages. Therefore, I need to do some work arounds to make it work.

syzop

2005-02-12 19:51

administrator   ~0009111

Added in .265.

It now prints out a warning if no log { } blocks are present and then uses a default of logging errors to ircd.log.

I've moved the win32 eventlog idea to 0002339 [hm, nice 'clone bug' button :p]

Issue History

Date Modified Username Field Change
2005-02-10 00:44 w00t New Issue
2005-02-10 14:04 Stealth Note Added: 0009062
2005-02-10 15:43 aquanight Note Added: 0009063
2005-02-10 22:33 w00t Note Added: 0009064
2005-02-10 22:58 Stealth Note Added: 0009067
2005-02-10 23:00 syzop Note Added: 0009068
2005-02-11 01:34 crazy Note Added: 0009070
2005-02-11 07:19 w00t Note Added: 0009074
2005-02-11 12:40 codemastr Note Added: 0009080
2005-02-11 16:03 syzop Status new => acknowledged
2005-02-11 17:54 Stealth Note Added: 0009084
2005-02-12 02:15 w00t Note Added: 0009087
2005-02-12 05:50 skyflash Note Added: 0009088
2005-02-12 06:52 w00t Note Added: 0009089
2005-02-12 07:24 skyflash Note Added: 0009090
2005-02-12 07:35 w00t Note Added: 0009091
2005-02-12 13:16 codemastr Note Added: 0009103
2005-02-12 19:39 syzop Status acknowledged => assigned
2005-02-12 19:39 syzop Assigned To => syzop
2005-02-12 19:49 syzop Issue cloned: 0002339
2005-02-12 19:49 syzop Relationship added related to 0002339
2005-02-12 19:51 syzop Status assigned => resolved
2005-02-12 19:51 syzop Fixed in Version => 3.2.3
2005-02-12 19:51 syzop Resolution open => fixed
2005-02-12 19:51 syzop Note Added: 0009111