update
This commit is contained in:
parent
4eaa9080e6
commit
b5d67b257e
@ -155,13 +155,13 @@ void hack::Initialize()
|
|||||||
{
|
{
|
||||||
signal(SIGPIPE, SIG_IGN);
|
signal(SIGPIPE, SIG_IGN);
|
||||||
time_injected = time(nullptr);
|
time_injected = time(nullptr);
|
||||||
passwd *pwd = getpwuid(getuid());
|
/*passwd *pwd = getpwuid(getuid());
|
||||||
char *logname = strfmt("/tmp/cathook-game-stdout-%s-%u.log", pwd->pw_name, time_injected);
|
char *logname = strfmt("/tmp/cathook-game-stdout-%s-%u.log", pwd->pw_name, time_injected);
|
||||||
freopen(logname, "w", stdout);
|
freopen(logname, "w", stdout);
|
||||||
free(logname);
|
free(logname);
|
||||||
logname = strfmt("/tmp/cathook-game-stderr-%s-%u.log", pwd->pw_name, time_injected);
|
logname = strfmt("/tmp/cathook-game-stderr-%s-%u.log", pwd->pw_name, time_injected);
|
||||||
freopen(logname, "w", stderr);
|
freopen(logname, "w", stderr);
|
||||||
free(logname);
|
free(logname);*/
|
||||||
// Essential files must always exist, except when the game is running in text
|
// Essential files must always exist, except when the game is running in text
|
||||||
// mode.
|
// mode.
|
||||||
#if ENABLE_VISUALS == 1
|
#if ENABLE_VISUALS == 1
|
||||||
|
@ -18,7 +18,7 @@ void logging::Initialize()
|
|||||||
{
|
{
|
||||||
// FIXME other method of naming the file?
|
// FIXME other method of naming the file?
|
||||||
passwd *pwd = getpwuid(getuid());
|
passwd *pwd = getpwuid(getuid());
|
||||||
logging::handle = fopen(strfmt("/tmp/cathook-%s.log", pwd->pw_name), "w");
|
logging::handle = fopen(strfmt("/tmp/cathook-%s-%d.log", pwd->pw_name, getpid()), "w");
|
||||||
}
|
}
|
||||||
|
|
||||||
void logging::Info(const char *fmt, ...)
|
void logging::Info(const char *fmt, ...)
|
||||||
|
Reference in New Issue
Block a user