EnglishGermanFrenchRussianItalianSpanish
Log inRegister
 
write to logfile # <Var/Number> append =<Var/Number> value =<Value>
Post new topic This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic
Author Message
mark_a_condren





Joined: 03 Aug 2005
Posts: 1385 on topic
Location: Newcastle - Australia
Thank you for registering your game
PostPosted: Mon, 20. Sep 10, 13:00    Post subject: write to logfile # <Var/Number> append =<Var/Number> value =<Value> Reply with quote Print

write to logfile # <Var/Number> append = <Var/Number> value = <Value>


<Var/Number> = The log file number that will be written to. If this does not exsist it will be created.
<Var/Number> = Set this value to [TRUE] / [FALSE], or their numerical equivalent of (1) / (0) respectively. Or, a variable containing one of these values.
<Value> = What is to be written to the log file.


Writes <Value> to an external file named logNNNNN.txt where NNNNN is the number specified in 'logfile # <Var/Number>'.

If logfile # = null, nothing at all will be written. This can be useful for debugging.

If append is [TRUE], then the value is added to the end of the log file.
If append is [FALSE], then the contents of the log file are replaced with <Value>.


Example:

The following might be used at the start of a 'Debug' log.

$playing.time = playing time
$fmt.playing.time = format time: $playing.time
$log.message = sprintf: fmt = 'Debug started at playing time = %s', $fmt.playing.time, null, null, null, null
write to logfile # 9999 append =[TRUE] value =$log.message

This would add the following message to the log file, 'Debug started at playing time = 12:34:56'. It would be 'added' due to 'append =[TRUE]'.


Command Location:



Back to top
View user's profile Send private message Send e-mail
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20717 on topic

Thank you for registering your game
PostPosted: Thu, 14. Oct 10, 19:02    Post subject: [TiP][49] 287271 Reply with quote Print

write to logfile # <Var/Number> append = <Var/Number> value = <Value>


<Var/Number> = Die Nummer der Log-Datei, in die geschrieben werden soll. Falls sie nicht existiert, wird sie erstellt.
<Var/Number> = Setze dies auf [TRUE] (wahr) / [FALSE] (falsch), oder auf ihre numerischen Äquivalente (1) / (0). Oder auf eine Variable, die einen dieser Werte enthält.
<Value> = Was in die Log-Datei geschrieben werden soll.


Schreibt <Value> in eine externe Datei mit dem Namen 'logNNNNN.txt', wobei 'NNNNN', die in 'logfile # <Var/Number>' festgelegte Zahl ist.

Wenn logfile # = null ist, wird überhaupt nichts geschrieben. Dies kann zum Debuggen nützlich sein.

Wenn append [TRUE] ist, wird der Wert ans Ende der Log-Datei geschrieben.
Wenn append [FALSE] ist, wird der Inhalt der Log-Datei mit <Value> ersetzt.


Beispiel:

Das folgende wird möglicherweise am Anfang eines "Debug"-Logs genutzt:

$playing.time = playing time
$fmt.playing.time = format time: $playing.time
$log.message = sprintf: fmt = 'Debug started at playing time = %s', $fmt.playing.time, null, null, null, null
write to logfile # 9999 append =[TRUE] value =$log.message

Dies würde die folgende Nachricht in die Log-Datei schreiben: 'Debug started at playing time = 12:34:56'. Es würde aufgrund von 'append =[TRUE]' hinzugefügt werden.


Zu finden unter:


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic This topic is locked: you cannot edit posts or make replies.
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Tue, 17. Jul 18, 13:24

All times are GMT + 2 Hours

[ Disclaimer / Impressum ] | [ Privacy Policy / Datenschutz ]

Board Security

Copyright © EGOSOFT 1989-2018
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 2.49928 seconds, sql queries = 16