[GH-ISSUE #138] Add timestamp to log messages #110

Closed
opened 2026-02-27 01:59:33 +03:00 by kerem · 8 comments
Owner

Originally created by @H3llGhost on GitHub (Aug 23, 2014).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/138

Hello,

to understand some issues with my servers it would be nice to have timestamps in the log files to see which output is generated when.

Originally created by @H3llGhost on GitHub (Aug 23, 2014). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/138 Hello, to understand some issues with my servers it would be nice to have timestamps in the log files to see which output is generated when.
kerem closed this issue 2026-02-27 01:59:33 +03:00
Author
Owner

@Scarsz commented on GitHub (Aug 23, 2014):

Which script specifically would you want us to look at? I'll look at a couple to see what logs can and can't have timestamps in them, though.

<!-- gh-comment-id:53156842 --> @Scarsz commented on GitHub (Aug 23, 2014): Which script specifically would you want us to look at? I'll look at a couple to see what logs can and can't have timestamps in them, though.
Author
Owner

@H3llGhost commented on GitHub (Aug 23, 2014):

I am looking especially for Garrys Mod, at the moment there is only a simple:
"exec cat >> '${consolelog}'" https://github.com/dgibbs64/linuxgameservers/blob/master/GarrysMod/gmodserver#L605

So I think it must be possible to add before each line a timestamp, for example like http://unix.stackexchange.com/questions/56189/appending-timestamp-stamp-along-with-log-file-lines .

<!-- gh-comment-id:53157122 --> @H3llGhost commented on GitHub (Aug 23, 2014): I am looking especially for Garrys Mod, at the moment there is only a simple: `"exec cat >> '${consolelog}'"` https://github.com/dgibbs64/linuxgameservers/blob/master/GarrysMod/gmodserver#L605 So I think it must be possible to add before each line a timestamp, for example like http://unix.stackexchange.com/questions/56189/appending-timestamp-stamp-along-with-log-file-lines .
Author
Owner

@Scarsz commented on GitHub (Aug 23, 2014):

If you haven't already, check the serverfiles/garrysmod/logs folder and see if those are the timestamps you're wanting.

<!-- gh-comment-id:53160357 --> @Scarsz commented on GitHub (Aug 23, 2014): If you haven't already, check the serverfiles/garrysmod/logs folder and see if those are the timestamps you're wanting.
Author
Owner

@H3llGhost commented on GitHub (Aug 23, 2014):

Do you mean in the file names itself? No that aren't the expected one.

I am searching for something like:

[23.08.2014 19:58:01] Adding Filesystem Addon '/home/srcds/server/gmttt/garrysmod/addons/utimem'
[23.08.2014 19:58:01] Unknown command "cl_cmdrate"
<!-- gh-comment-id:53160458 --> @H3llGhost commented on GitHub (Aug 23, 2014): Do you mean in the file names itself? No that aren't the expected one. I am searching for something like: ``` [23.08.2014 19:58:01] Adding Filesystem Addon '/home/srcds/server/gmttt/garrysmod/addons/utimem' [23.08.2014 19:58:01] Unknown command "cl_cmdrate" ```
Author
Owner

@Scarsz commented on GitHub (Aug 23, 2014):

No, in the files themselves. There were time stamps in there for me and that would be what you're looking for, though those logs might start after where you're getting a your server errors. Try running the script like ./gmodserver debug

<!-- gh-comment-id:53161655 --> @Scarsz commented on GitHub (Aug 23, 2014): No, in the files themselves. There were time stamps in there for me and that would be what you're looking for, though those logs might start after where you're getting a your server errors. Try running the script like `./gmodserver debug`
Author
Owner

@dgibbs64 commented on GitHub (Aug 25, 2014):

Not sure if that's possible. You are looking at console log which simply outputs exactly what the server is printing to screen. Looking at the game logs may be more what you are after

<!-- gh-comment-id:53350840 --> @dgibbs64 commented on GitHub (Aug 25, 2014): Not sure if that's possible. You are looking at console log which simply outputs exactly what the server is printing to screen. Looking at the game logs may be more what you are after
Author
Owner

@H3llGhost commented on GitHub (Aug 25, 2014):

Exactly what I need. I thought it is enabled by default. I am sorry, my mistake.

<!-- gh-comment-id:53353906 --> @H3llGhost commented on GitHub (Aug 25, 2014): Exactly what I need. I thought it is enabled by default. I am sorry, my mistake.
Author
Owner

@lock[bot] commented on GitHub (Jul 20, 2018):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:406479790 --> @lock[bot] commented on GitHub (Jul 20, 2018): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#110
No description provided.