Advertisement:

Author Topic: SOLVED Logs in database  (Read 1052 times)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
SOLVED Logs in database
« on: December 09, 2017, 10:58:35 am »
Hi,

I saw that there is a table with logs in the database.
My question is related to the fact that I saw in the forums that an osclass with hundreds of thousands of ads gets slower. I can't imagine the size of that logs table when the site has so many items. Wouldn't this affect the performance of the site/server?

Thank you.
« Last Edit: December 10, 2017, 12:38:27 am by marius-ciclistu »

Aficionado

  • Guest
Re: Logs in database
« Reply #1 on: December 09, 2017, 11:01:42 am »
Yeap, i never really understood that and should be at least selectable.

See:

https://market.osclass.org/plugins/db-tools/database-log-table_250

This is what i use to clean things up.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #2 on: December 09, 2017, 11:09:16 am »
Incredible.... These plugins....who invented them?
I think I'll analyze the plugin and I'll make a core adaptation for it.
I'll never finish this osclass installation...after 10 months, I still discover new 'bugs' that are dealed with via plugins.....
Why don't the core handle these by default....

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #3 on: December 09, 2017, 11:11:28 am »
But until then, if I understood right, I can clean the logs via phpMyAdmin?

Aficionado

  • Guest
Re: Logs in database
« Reply #4 on: December 09, 2017, 11:15:48 am »
Incredible.... These plugins....who invented them?
I think I'll analyze the plugin and I'll make a core adaptation for it.
I'll never finish this osclass installation...after 10 months, I still discover new 'bugs' that are dealed with via plugins.....
Why don't the core handle these by default....

Well, Osclass team believe that everything should NOT be into the core but done with Plugins.

I can't comment on that, since i'm not a programmer. The plugin from dev101 i posted above, works very well, and i think it is enough. No need to build that into the core. Into the core should be an OPTION to enable the log or not, just that.


marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #5 on: December 09, 2017, 11:23:42 am »
I know the policy :)
I'll built it in the core, because that's me. No plugins to mess things up and make debugging harder.

PS. These logs did not help you with that demo@demo.com admin?

Aficionado

  • Guest
Re: Logs in database
« Reply #6 on: December 09, 2017, 11:28:25 am »

PS. These logs did not help you with that demo@demo.com admin?

Nope, they didn't help me at all.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #7 on: December 09, 2017, 11:52:26 am »
So, regarding this plugin.
What's your oppinion about :
1. truncate (deleting all table ...-log and creating a new identical empty one - it's faster than delete http://www.mysqltutorial.org/mysql-truncate-table/) ONCE A WEEK with the weekly cron?
(the plugin truncates the bable at the desired time interval)

2. In order to not lose some maybe important logs for admins and moderators, maybe a shorter period for cleaning it would be better and not using truncate but detele all rows from users (delete will take longer but..) older than 1 week and all rows from admins older than 1 month for example (the admin activity should be smaller than the users').

I'm just thinking this through before starting to code the functionality in my core ( but also this could bring new ideas for this plugin).


marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #8 on: December 09, 2017, 12:10:08 pm »

PS. These logs did not help you with that demo@demo.com admin?

Nope, they didn't help me at all.

I mean if these logs did show that that user was made or not.
I'm guessing that if the user was made via admin pannel the log should have been there and if it was made via phpMyAdmin it shouldn't.
Also I'm not sure about the log's behaviour if the user was made through sql injection.

Aficionado

  • Guest
Re: Logs in database
« Reply #9 on: December 09, 2017, 12:45:40 pm »

I mean if these logs did show that that user was made or not.
I'm guessing that if the user was made via admin pannel the log should have been there and if it was made via phpMyAdmin it shouldn't.
Also I'm not sure about the log's behaviour if the user was made through sql injection.

I don't remember exactly, but i do know that i checked and found no usefull information.

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #10 on: December 09, 2017, 01:11:39 pm »
Ok. So about the log table. What's your oppinion about my above thoughts?

Meder

  • Newbie
  • *
  • Posts: 4
Re: Logs in database
« Reply #11 on: December 09, 2017, 01:16:21 pm »
please help me to set CNC ! when I click *read more* me says page not found what should I do?

Aficionado

  • Guest
Re: Logs in database
« Reply #12 on: December 09, 2017, 01:17:27 pm »
please help me to set CNC ! when I click *read more* me says page not found what should I do?

Please do not highjack other's topic with no reason. Open a new Topic with details about your problem.


Aficionado

  • Guest
Re: Logs in database
« Reply #13 on: December 09, 2017, 01:20:02 pm »
Ok. So about the log table. What's your oppinion about my above thoughts?

I can't comment on those. I'm fully covered with the plugin, i have set it to monthly and i'm good.

Also as i said, i'm not a programmer, but i'm an experienced web master and consultant, and i hate to add things that already exist. I wouldn't re-invent the wheel, if you get what i',m saying ...



marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1652
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Logs in database
« Reply #14 on: December 09, 2017, 02:20:40 pm »
I know you are experienced, that's why I asked.
Ok. Thank you. I think I'll implement the 2nd option to always have a buffer period of logs.