| View previous topic :: View next topic |
| Author |
Message |
urgido Voice
Joined: 24 Jul 2008 Posts: 3
|
Posted: Sat Jul 26, 2008 1:30 am Post subject: write log |
|
|
| which the command to force an eggdrop to write a log??? |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sat Jul 26, 2008 11:07 am Post subject: |
|
|
putlog, putcmdlog, putxferlog, putloglev
| doc/tcl-commands.doc wrote: | putlog <text>
Description: sends text to the bot's logfile, marked as 'misc' (o)
Returns: nothing
Module: core
putcmdlog <text>
Description: sends text to the bot's logfile, marked as 'command' (c)
Returns: nothing
Module: core
putxferlog <text>
Description: sends text to the bot's logfile, marked as 'file-area' (x)
Returns: nothing
Module: core
putloglev <level(s)> <channel> <text>
Description: sends text to the bot's logfile, tagged with all of the
valid levels given. Use "*" to indicate all log levels.
Returns: nothing
Module: core
|
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
urgido Voice
Joined: 24 Jul 2008 Posts: 3
|
Posted: Sun Jul 27, 2008 3:15 pm Post subject: |
|
|
how i can create a .log file with this format:
BOTNAME-(dd-mm-yy).log
And then write on the file a line. |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Sun Jul 27, 2008 6:49 pm Post subject: |
|
|
I'd do something like this:
| Code: |
set filename "/home/user/eggdrop/BOTNAME-[clock format [clock seconds] -format "%Y-%m-%d"].log"
set fID [open $filename "WRONLY CREAT APPEND"]
puts $fID "Some textline"
close $fID |
Edit: Forgot to open the file in append-mode, fixed now _________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
|