[SOLVED]Saving Logs Into A Text Document

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

[SOLVED]Saving Logs Into A Text Document

#1

Post by Fabysk » Sun Nov 02, 2014 11:40 pm

This a big step for me for creating songs for Zand Band. I figured out how to place notes easier for any song using simple ACS codes with the delay's being saved in the console. With all that done, how do I save whatever is in the console into a text document? I believe it is the console command "LogFile", as seen on the ZDoom Wiki, but where does it save it exactly? Or if there's a way to manually save whatever is in the console, please post here. This is the only thing I have left to do.
Last edited by Fabysk on Mon Nov 03, 2014 3:10 am, edited 1 time in total.
Image Image Image

User avatar
Slim
Zandrone
Posts: 1112
Joined: Sat Mar 16, 2013 7:11 am
Location: Zero Space
Clan: Can't fit it in here
Clan Tag: -=FSR=-
Contact:

RE: Saving Logs Into A Text Document

#2

Post by Slim » Sun Nov 02, 2014 11:48 pm

Code: Select all

logfile "C:\place\place2\place3\zandylog.txt"
Last edited by Slim on Sun Nov 02, 2014 11:49 pm, edited 1 time in total.
Image

"Your childish antics grow tiring. If you dare to fight me, then I accept your challenge: Anytime, anywhere." - Zero, Megaman X5
Spoiler: Quotes (Open)
5:54 PM - Slim: you're complaining about something so small that
5:54 PM - Lance: so? we do that all the time
5:55 PM - Lance: we're a bunch of losers complaining at a bar minus the bar
Spoiler: Galactus tried evading (Open)
Image

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Saving Logs Into A Text Document

#3

Post by Fabysk » Mon Nov 03, 2014 12:06 am

Suicide Slim wrote:

Code: Select all

logfile "C:\place\place2\place3\zandylog.txt"
It does create the text file, but only saves the time and location of the file
Image Image Image

User avatar
ibm5155
Addicted to Zandronum
Posts: 1641
Joined: Tue Jun 05, 2012 9:32 pm
Location: Somewhere, over the rainbow

RE: Saving Logs Into A Text Document

#4

Post by ibm5155 » Mon Nov 03, 2014 1:47 am

It'll create a text file, with sasves time and location AND all the print and log commands that you made (and with that you can create a generic eicar virus too xD)
edit: Idk if hudmessage is stored too...
Last edited by ibm5155 on Mon Nov 03, 2014 1:48 am, edited 1 time in total.
Projects
Cursed Maze: DONE, V2.0
Zombie Horde - ZM09 map update: [3/15/13]
Need help with English? Then you've come to the right place!

<this post is proof of "Decline">

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Saving Logs Into A Text Document

#5

Post by Fabysk » Mon Nov 03, 2014 3:10 am

I have solved what I have wanted :smile:
Image Image Image

User avatar
Empyre
Zandrone
Posts: 1316
Joined: Sun Jul 08, 2012 6:41 am
Location: Garland, TX, USA

RE: [SOLVED]Saving Logs Into A Text Document

#6

Post by Empyre » Mon Nov 03, 2014 2:41 pm

Please share your solution for the benefit of others who have the same question in the future.
"For the world is hollow, and I have touched the sky."

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: [SOLVED]Saving Logs Into A Text Document

#7

Post by Fabysk » Tue Nov 04, 2014 12:22 am

Empyre wrote: Please share your solution for the benefit of others who have the same question in the future.
I'll try my best from memory. I did so many wrong turns in getting this to work.
  • Open up the Zandronum folder from this file path C:\Users\(Your User Name)\AppData\Local\VirtualStore\Program Files (x86)\Zandronum. The file path should be something like this. This is where I found mine.
  • Create a text file and name it "autoexec.cfg"
  • Within the text file, type this in "logfile textFileName.txt"
  • Now, every time you play a mod that you have created, it will start logging everything within the console as soon as the mod starts up.
With that done and instead of copying and pasting the whole file path where "autoexec.cfg" is located for logging, I created a key bind within SLADE 3:

Code: Select all

addmenukey "Save Log" Save_Log
aliasSave_Log "logfile C:\Users\(Your User Name)\AppData\Local\VirtualStore\Program Files (x86)\Zandronum\autoexec.cfg"
defaultbind M Save_Log
When you press your key bind for logging, it will be created where your mod is located.

This is what I did to do file logging for single player. I am not 100% sure if this method of offline logging will work for other users. I did this for Zand Band purposes, to create songs easier.
Image Image Image

User avatar
Slim
Zandrone
Posts: 1112
Joined: Sat Mar 16, 2013 7:11 am
Location: Zero Space
Clan: Can't fit it in here
Clan Tag: -=FSR=-
Contact:

RE: [SOLVED]Saving Logs Into A Text Document

#8

Post by Slim » Tue Nov 04, 2014 2:10 am

Yeah, my bad for not being specific in my first post here, I meant to say, logfile saves from when it's executed to when it's either executed again or Zandronum is closed. For all logging benefits and dodging forgetfulness, I have it activate in autoexec and stop when Z& is closed, plenny of singleplayer and online logs filled with obituaries and console commands/binds with echo. Someday I'll have to clean those out because they clutter so much.
Image

"Your childish antics grow tiring. If you dare to fight me, then I accept your challenge: Anytime, anywhere." - Zero, Megaman X5
Spoiler: Quotes (Open)
5:54 PM - Slim: you're complaining about something so small that
5:54 PM - Lance: so? we do that all the time
5:55 PM - Lance: we're a bunch of losers complaining at a bar minus the bar
Spoiler: Galactus tried evading (Open)
Image

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: [SOLVED]Saving Logs Into A Text Document

#9

Post by Fabysk » Tue Nov 04, 2014 3:56 am

Suicide Slim wrote: Yeah, my bad for not being specific in my first post here, I meant to say, logfile saves from when it's executed to when it's either executed again or Zandronum is closed. For all logging benefits and dodging forgetfulness, I have it activate in autoexec and stop when Z& is closed, plenny of singleplayer and online logs filled with obituaries and console commands/binds with echo. Someday I'll have to clean those out because they clutter so much.
It's all good Slim. But there is something else that bothers me with the logging. Is it possible to remove the timestamps of the logs?
Image Image Image

User avatar
Slim
Zandrone
Posts: 1112
Joined: Sat Mar 16, 2013 7:11 am
Location: Zero Space
Clan: Can't fit it in here
Clan Tag: -=FSR=-
Contact:

RE: [SOLVED]Saving Logs Into A Text Document

#10

Post by Slim » Tue Nov 04, 2014 10:20 am

Fabysk wrote: Is it possible to remove the timestamps of the logs?
I wish I knew, they are a bit cumbersome at times. But I don't think it's possible.
Image

"Your childish antics grow tiring. If you dare to fight me, then I accept your challenge: Anytime, anywhere." - Zero, Megaman X5
Spoiler: Quotes (Open)
5:54 PM - Slim: you're complaining about something so small that
5:54 PM - Lance: so? we do that all the time
5:55 PM - Lance: we're a bunch of losers complaining at a bar minus the bar
Spoiler: Galactus tried evading (Open)
Image

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: [SOLVED]Saving Logs Into A Text Document

#11

Post by Torr Samaho » Tue Nov 04, 2014 8:18 pm

Fabysk wrote: It's all good Slim. But there is something else that bothers me with the logging. Is it possible to remove the timestamps of the logs?
Yes, set "sv_logfiletimestamp 0".

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: [SOLVED]Saving Logs Into A Text Document

#12

Post by Fabysk » Wed Nov 05, 2014 12:54 am

Torr Samaho wrote: Yes, set "sv_logfiletimestamp 0".
Thank you so much Torr. This saves me a lot of time
Image Image Image

User avatar
Slim
Zandrone
Posts: 1112
Joined: Sat Mar 16, 2013 7:11 am
Location: Zero Space
Clan: Can't fit it in here
Clan Tag: -=FSR=-
Contact:

RE: [SOLVED]Saving Logs Into A Text Document

#13

Post by Slim » Wed Nov 05, 2014 7:12 am

Torr Samaho wrote:
Yes, set "sv_logfiletimestamp 0".
Eh? Is there a way for clientside logs too? Since sv_ commands are executed by server/rcon only, if there's a clientside version of this I'd love to see it.
Image

"Your childish antics grow tiring. If you dare to fight me, then I accept your challenge: Anytime, anywhere." - Zero, Megaman X5
Spoiler: Quotes (Open)
5:54 PM - Slim: you're complaining about something so small that
5:54 PM - Lance: so? we do that all the time
5:55 PM - Lance: we're a bunch of losers complaining at a bar minus the bar
Spoiler: Galactus tried evading (Open)
Image

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: [SOLVED]Saving Logs Into A Text Document

#14

Post by Torr Samaho » Sat Nov 08, 2014 11:06 am

Suicide Slim wrote: Since sv_ commands are executed by server/rcon only, if there's a clientside version of this I'd love to see it.
The prefix of the flag is misleading. It should affect all files written by the logfile command, no matter if they are written by the server or the client.

Post Reply