Aller au contenu

Photo

Logging question


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
stuntpope

stuntpope
  • Members
  • 112 messages
Ok - I can get logging to work, but I have a question.

With Script=1 set in the EClog.ini file and using the LogTrace function, anything with LOG_CHANNEL_PLOT gets printed to the log, but other channels, for example LOG_CHANNEL_EVENTS_CHARGEN do not print.

What option needs to be turned on in the ini file for those other channels to print to the log?

I have looked here: http://social.biowar...x.php/ECLog.ini and tried the most likely option but I can't find anything that works.

Modifié par stuntpope, 04 décembre 2009 - 11:43 .


#2
stuntpope

stuntpope
  • Members
  • 112 messages
In fact I just tested logging with all of those values mentioned in the wiki set to 1 and it still doesn't show up.

#3
Nodrak

Nodrak
  • Members
  • 144 messages
Stupid extra line breaks, also I fail at reading :(

The function was designed for their 3rd party logging system, at least by my understanding.  Without some testing you won't know what to expect.  There are many logging methods defined in log_h.

The function you are likely wanting is PrintToLog.

Modifié par Nodrak, 04 décembre 2009 - 12:32 .


#4
stuntpope

stuntpope
  • Members
  • 112 messages
Yeah I know I can use print to log. But a lot of the existing scripts already have log calls in them using LogTrace and I'd like to be able to see those. This can be handy to see when events are being handled by core scripts.

#5
Nodrak

Nodrak
  • Members
  • 144 messages
Those are all handled by their 3rd party developer logging system, one of the Bio guys said that here in the scripting forum, but I can't find it.

#6
stuntpope

stuntpope
  • Members
  • 112 messages
I just saw this comment in log_h:

//Note: SHIP mode executables do not support the LogTrace command and as
// such will never provide deja/log output, even if this symbol
// is defined.

Which makes me wonder how GetPlot and Setplot are going into the log because they use the same function.

Modifié par stuntpope, 04 décembre 2009 - 12:44 .


#7
Nodrak

Nodrak
  • Members
  • 144 messages
The only distinction appears to be that the plot logging function call is not bounded by the debug definition:
#ifdef DEBUG
#endif

You could try removing them from whatever script you want to see in the log, but removing them all would make your log a mess.

Its likely Georg did this to allow end moders to see plot interactions easier, but you would have to ask him.  The plot script was made by another person.

Modifié par Nodrak, 04 décembre 2009 - 12:55 .


#8
stuntpope

stuntpope
  • Members
  • 112 messages
no there are other cases where the debug symbols are not there and they are not logging. e.g. in sys_chargen.



According to that comment in the log_h file - that LogTrace function should not be working at all in the ship build.

#9
stuntpope

stuntpope
  • Members
  • 112 messages
But I think you are right that they must have changed their mind about the plot logging and left that channel open even in the ship build.

Modifié par stuntpope, 04 décembre 2009 - 12:58 .


#10
Nodrak

Nodrak
  • Members
  • 144 messages
sys_chargen appears to be unique in that regards, likely from it being a different part of the engine.