This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

write log

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
u
urgido
Voice
Posts: 3
Joined: Thu Jul 24, 2008 8:45 pm

write log

Post by urgido »

which the command to force an eggdrop to write a log???
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
u
urgido
Voice
Posts: 3
Joined: Thu Jul 24, 2008 8:45 pm

Post by urgido »

how i can create a .log file with this format:

BOTNAME-(dd-mm-yy).log

And then write on the file a line.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I'd do something like this:

Code: Select all

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
Post Reply