Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:59:11+00:00 2026-06-11T20:59:11+00:00

I am developing a game server based on the top of someone else framework,

  • 0

I am developing a game server based on the top of someone else framework, netty and spring.

And I wonder whether it is a good approach to generate a separate file using log4j for every game room or not. Since with many game room servers has to keep open a lot of log files. On the other hand with only one log file it would be a total mess up which would required parsing and filtering when analyzing a problem.

If many log files is still a good approach when I need to know how to implement that. I have had a look at this question configure log4j to log to custom file at runtime, but first answer is not clear, how to minimize lines of code required in every attempt to write to a separate log file. I have tried the second answer with putting in config file

log4j.appender.logfile.File=${logfile.name}

but the framework has

PropertyConfigurator.configure(System.getProperty("log4j.configuration"));

which fails if log file is not specified at the start time.

Any ideas and comments are welcome! Thanks

UPD: This link also seems helpful in my case. Log4j logging to separate files But still: is it good idea and how to switch dynamically the output log file with minimal coding.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:59:12+00:00Added an answer on June 11, 2026 at 8:59 pm

    Really, when it comes down to it, having more than one log file for the game rooms would be overkill. The file I/O would have an effect on performance, even if that was negligible. Furthermore, as programmers, we have so many tools at our disposal for parsing and filtering information that it seems much more reasonable to do this after the fact.

    For instance, as long as each game room matches a specific pattern when logging, you could easily use grep and the Linux > operator to parse all of the data for game room X and write to another file where you could analyze it separately. Having your production server do this, when you may or may not even be looking at the logs, isn’t the best use of resources.

    As an example, running this command could quickly get me all the information I need about game room X:

    grep "game room x" mainLog.log > outputToAnalyze.log
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing the backend server for a turn based game using App Harbor and
I'm engaged in developing a turn-based casual MMORPG game server. The low level engine(NOT
I am developing a Flex-based game, and struggling with SmartFox Server. Anyway, it's a
I am developing a browser based game on a node.js server. I'm trying to
I am developing a multiplayer game server with Twisted. It's a simple game that
I'm developing a game using the libGDX Framework. I'd like to implement an icon
I'm developing an Asynchronous Game Server using .Net Socket Asynchronous Model( BeginAccept/EndAccept...etc.) The problem
I've been developing a Silverlight-c# client-server game that has now gotten to the point
I'm developing a social game in Flash with a team of developers. Our server-side
I'm developing a dedicated game server on a linux machine, in C/C++ (mixed). I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.