Page 1 of 1
SP logs locations
Posted: Mon Sep 29, 2014 1:47 pm
by 8guawong
in core_settings.ini
Code: Select all
# Set to the areas to log (console, main log, sp log, script log):
# Console = 1
# Main log = 2
# SP log = 4
# Script log = 8
where is main log? SP log and Script log??
main log location logs/source-python?
or
SP log logs/source-python?
Script log is where the plugins is? ie. addons/source-python/plugins/test
Posted: Mon Sep 29, 2014 2:03 pm
by satoon101
The main log is the actual server log that is created when you use the "log on" command. That file can be found in the ../logs/ directory. The SP log is created in the ../logs/source-python/ directory and is used by SP's API to log specific messages. The script's log is in the ../logs/source-python/ directory under what path you pass your script's specific LogManager instance.
Posted: Mon Sep 29, 2014 4:15 pm
by 8guawong
ah ok but why make it so complicated? isn't it simpler to log it all into one place.. like sourcemod? or we just like having choices

areas = 5 is probably what i want then

Posted: Mon Sep 29, 2014 7:30 pm
by satoon101
It isn't really complicated. We designed it that way for convenience, as different server operators will want the logs to be in different places.
Posted: Wed Oct 01, 2014 3:42 pm
by satoon101
Sorry for not going into more detail in my previous post. I haven't been on a computer in a few days and didn't feel like typing it all out on my phone.
The "script" one does not apply to the main SP Logger. That was left in there, for the time being, as an example for when a script wants to create their own LogManager instance. The main SP Logger will only log to the console, main server log, and its specific log file. The SP specific log file is created using the following format:
../logs/source-python/source-python.%m-%d-%Y.txt
%m is the 2 digit number representing the month. %d is the 2 digit number representing the day of the month. %Y is the 4 digit year. The date used is the date the file was created on. If you restart your server multiple times in 1 day, it will create the log file once and append items to it if it is already created.
There are planned changes to the LogManager class, as well as adding a new class that allows for package specific logging levels (which might just be implemented in LogManager instead of creating a new class).
5 is typically the value I use, as it keeps SP logs separate from the main log and it also shows in the console. If I rented a server, I would probably use 4 or 6 instead.
Posted: Wed Oct 01, 2014 4:17 pm
by 8guawong
satoon101 wrote:Sorry for not going into more detail in my previous post. I haven't been on a computer in a few days and didn't feel like typing it all out on my phone.
The "script" one does not apply to the main SP Logger. That was left in there, for the time being, as an example for when a script wants to create their own LogManager instance. The main SP Logger will only log to the console, main server log, and its specific log file. The SP specific log file is created using the following format:
../logs/source-python/source-python.%m-%d-%Y.txt
%m is the 2 digit number representing the month. %d is the 2 digit number representing the day of the month. %Y is the 4 digit year. The date used is the date the file was created on. If you restart your server multiple times in 1 day, it will create the log file once and append items to it if it is already created.
There are planned changes to the LogManager class, as well as adding a new class that allows for package specific logging levels (which might just be implemented in LogManager instead of creating a new class).
5 is typically the value I use, as it keeps SP logs separate from the main log and it also shows in the console. If I rented a server, I would probably use 4 or 6 instead.
yea not renting a server so 5 is what i use... but is it possible for next version of SP to change the log to be more informative??
for example of the error message
Code: Select all
10-01-2014 02:05:30 - sp - WARNING
Unable to add attribute "give_named_item"of type "functions" to entity type "player" due to the following:
Pointer is NULL.
but it doesn't show where this error is coming from , ie. what script
thanks!
Posted: Wed Oct 01, 2014 5:16 pm
by L'In20Cible
This warning is not from a script/plugin but from SP itself. It tells you the signature for that function is outdated since the pointer is NULL.
Posted: Wed Oct 01, 2014 5:20 pm
by 8guawong
L'In20Cible wrote:This warning is not from a script/plugin but from SP itself. It tells you the signature for that function is outdated since the pointer is NULL.
ok yea i see other warning messaged now
so how bout keep the most recent warning message on the TOP of the file instead of the bottom? so we don't have to scroll all the way down?

Posted: Wed Oct 01, 2014 5:20 pm
by satoon101
Well, that is a warning, not an error. That just means that a signature is not found by the API that registers dynamic functions for entities. It is really just an indication that the SP data needs updating, and has nothing to do with any script.
Posted: Thu Oct 02, 2014 3:12 am
by satoon101
Sorry, didn't see your's or L'In20Cible's replies prior to mine above when I posted it.
8guawong wrote:so how bout keep the most recent warning message on the TOP of the file instead of the bottom? so we don't have to scroll all the way down?
Logging doesn't work that way. Logging appends the current message to the end of the file. All 3 functionalities do this. engine_server.log_print appends the message to the end of the main log file. echo_console prints the message to the server console, at the end. Python's built-in logging package, which we utilize for the SP Logger file, appends the message to the end of the file. There are no plans whatsoever to change this.
Posted: Thu Oct 02, 2014 8:06 am
by 8guawong
satoon101 wrote:Sorry, didn't see your's or L'In20Cible's replies prior to mine above when I posted it.
8guawong wrote:so how bout keep the most recent warning message on the TOP of the file instead of the bottom? so we don't have to scroll all the way down?
Logging doesn't work that way. Logging appends the current message to the end of the file. All 3 functionalities do this. engine_server.log_print appends the message to the end of the main log file. echo_console prints the message to the server console, at the end. Python's built-in logging package, which we utilize for the SP Logger file, appends the message to the end of the file. There are no plans whatsoever to change this.
ok just a suggestion but no biggie
