Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  What and what not to log while debugging

Log is a critical part of an application. It serves as an eye to the programmer on how the application is working while debugging. Especially for applications running on production environment, if the application encounters problem and the problem cannot be reproduced on other environments, log will be extremely useful.While log is essential, but developers have to log smartly. Because if don't put log smartly, you may not get what you want while debugging or you may get too many redundant logs which eat up the disk space and degrade the performance of the system.So what and wha...

5,164 0       PROGRAMMING SUPPORT DEBUG LOG


  Some cases where MySQL cannot be started

After installing MySQL, when we try to start MySQL, sometimes we may not be able to start it. The reasons can be different. We share some general cases where MySQL cannot be started.Case 1: Directory or file permission issueIf the permission is set wrongly in MySQL's $datadir and its sub directories or files, MySQL will not be able to read and write files normally.Error message:mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/data/usr/local/mysql/bin/mysqld_safe: line 107: /usr/local/mysql/data/imysql.local.err: Permission deniedCase 2: Port conflictThere may be other my...

4,603 0       MYSQL ERROR LOG


  One thought about JavaScript exception handle

Due to network, browser and cache issues, the JS executed in production may produce different results from the testing environments. Sometimes they may produce exceptions. Front-end developers may encounter this kind of exceptions frequently. But how to log and use them is seldomly considered by them. Actually, exception handling includes two steps : log and use.1. LogRegarding to log error, this is relatively convenient, since in each browser, there is one interface called window.onerror.window.onerror =function(errorMessage, scriptURL, lineNumber){ alert(errorMessage, scriptURL, lineNumber)...

2,234 0       EMAIL LOG EXCEPTION JAAVSCRIPT


  Use of log in programming

Usually, The purposes of log are for troubleshooting and displaying program running status. Good log will help us locate the error easier. Many programmers think log in programs is very simple, but it's not an easy task to write log codes to efficiently locate the error. Here we discuss about program log in three aspects:Where to logWhat to logLog styles to be avoidedWhere to log1. When calling external functionsWhen your program is calling some external functions which are not written by you, you need to log before and after the external function call. This will help debug.1. LOG.debug("Call...

3,528 0       PROGRAMMING DEBUG LOG


  Three things you should never put in your database

As I've said in a few talks, the best way to improve your systems is by first notdoing "dumb things". I don't mean you or your development staff is "dumb", it'seasy to overlook the implications of these types of decisions and not realize howbad they are for maintainability let alone scaling. As a consultant I see this stuffall of the time and I have yet to ever see it work out well for anyone.Images, files, and binary dataYour database supports BLOBs so it must be a good idea to shove your files in thereright? No it isn't! Hell it isn't even very convenient to use with many DB languagebindings...

3,254 0       DATABASE IMAGE LOG BLOB


  How to secure an Ubuntu Apache web server

Securing server software is not a straightforward task. Not all of our operating environments are the same, leading to a variety of potential security vulnerabilities. However, using a few basic configuration and security options, you can stay a little ahead of where you want to be.1. Fail2banFail2ban is a Python-based intrusion prevention software that detects and blocks malicious IP addresses from multiple unsuccessful attempts at software logins. In other words, if someone is attempting to login to your server via ssh, it detects multiple, unsuccessful attempts and blocks that user ip for a...

4,307 0       CACHE .HTACCESS UNIX SERVER SECURITY LOG