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 7871007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:47:03+00:00 2026-06-03T01:47:03+00:00

We have some custom logs that we maintain in the database (mysql). We use

  • 0

We have some custom logs that we maintain in the database (mysql). We use these logs to keep track of recent errors and email activity in our zend framework application.

We found out recently that these logs create some stress on the database, as we perform multiple read / writes on these log tabs. It’s also slows down the application, as we need to perform mysql INSERTs, and sometimes these log tables get locked by other SELECT queries.

We use Zend_Log adapters to perform the log writes, as such:

    $columnMapping = array('url' => 'url', 'userAgent' => 'userAgent', 'info' => 'info', 'reffer' => 'reffer', 'userId' => 'userId', 'priority' => 'priority','dateInserted' => 'dateInserted', 'message' => 'message');
    $writer_db = new Zend_Log_Writer_Db($db, 'log', $columnMapping);

We also have a custom cronjob that cleans out old entries from the log each night, which also creates some stress on the database.

The only requirement we have for these logs, is that they should be searchable from a central location, as we have multiple servers writing these logs.

Any alternative for writing logs in a zend framework application? any good Zend_Log adapters that can help in this case?

  • 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-03T01:47:04+00:00Added an answer on June 3, 2026 at 1:47 am

    You could use a file logger to a “drive” that is shared among all the servers via NTP. It is searchable with the standard unix search tools (grep, awk, etc).

    Another solution would be to use the Syslog writer and set up a syslog server that receives the log messages. There are many applications that can analyze the syslog format.

    The third option would be to use MongoDB as a storage facility for your logs. Here is an article that explains how to implement a Log Writer that writes to MongoDB. MongoDB has “asynchronous inserts” so your application does not have to wait until the log entry was written to the database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Record model (Active Record) that stores some custom logs. Record is
I have some custom logic that needs to be executed every single time a
I have authored some custom classes that I would like to create using XAML:
I have a custom shell script that runs each time a user logs in
I have a custom python script that monitors the call logs from a Nortel
I have some custom type: [RdfSerializable] public class Item { [RdfProperty(true)] public string Name
I have some existing custom Excel workbooks/applications with code-behind C#, which work fine. They
I have a web service method where I would like to throw some custom
I have an XSL style sheet for which I need to add some custom
I have a Silverlight app with a DataGrid containing some custom columns and all

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.