0

We are building a SAAS solution and we have plans to use log4net for the logging. Let's say this application has 50k users. What would be the best approach to handle logging?

  1. One log file per user?
  2. One big log file per day?

Thanks

anuradha
  • 123
  • 1
  • 9

1 Answers1

1

Generally Log consist simple text type data. I suggest 1 log per user, it is scaled solution. if you need to find any specif data log fr specific user, you could do it easily compared with big file each day. JSON Key-Pair would be more helpful.

kazi
  • 152
  • 1
  • 12
  • Thanks for the reply. What did you mean by JSON Key-Pair ? – anuradha Mar 08 '18 at 11:15
  • You are welcome. Check the Key Pair Value form another SO link https://stackoverflow.com/questions/26941090/json-key-value-pairs-within-an-array-in-php-using-the-json-encode-function – kazi Mar 09 '18 at 09:36
  • On the other hand, if you are looking for information that isn't related to a specific user, you need to search through 50000 files. This question is primarily opinion based, so may get closed, but you may want to look into logging to database. See https://stackoverflow.com/questions/290304/is-writing-server-log-files-to-a-database-a-good-idea – sgmoore Mar 09 '18 at 09:44