Where do I find the error log file?

I can guarantee you, I am not the only person who has been driven to madness at least once in a frustrating search for a log file. It seems like it should be the easiest thing to find in the whole system.

A definitive guide on where the PHP error log is stored would be a complicated bit of work. The official PHP manual does not even try to address the whole topic, because there are dependencies on systems outside PHP, such as the operating system (Linux vs. Windows, which distribution of Linux), including settings within Windows and Linux that affect the name and location of the PHP error log.

Until someone takes the time to write a complete, cross-system guide, the best you are going to get is general directions where you can inquire. Every PHP developer has had to endure agony in this pursuit, with one exception. If you work in one place and the information is provided when you first need it, then you have the information need forever, that is, until you find yourself in a new working environment. There are such fortunate people.

If the information is not given to you on a silver platter, so to speak, you have some hunting to do. The hunt is not the longest you will face in your career, but it is not the simplest either.

As is evident from the many answers already posted, a smart place to begin is the output of phpinfo(). To view it, create a PHP file containing this:

The various log files contain useful information and error messages to help you troubleshoot your solution.

Errors that occur in Insight Designer are logged in the Eclipse error log. You can also analyze the Liberty server trace.log and messages.log files to find out why errors occurred and to determine whether event processing, connectivity, persistence, and aggregation are working as expected.

Finding information about the run time

For information about the run time, open and search the Liberty server log file trace.log. The following table lists some key search phrases that can help you locate specific information in the server error log files.

Table 1. Key strings in the trace filesString to search forGives information aboutreceived event_nameID, time stamp, and other attributes of an incoming event.begin processingAgent processing activity.retrieved entityClass name, ID, and other attributes of a bound entity,rule rule_name execution startedName of the fired rule, rule processing, and output.

When an exception error occurs during runtime processing, a First Failure Data Capture (FFDC) record is created. Look for files that include ffdc* in the file name in the logs folder under the server directory. For example: <WLP_USER_DIR>/servers/cisDev/logs/ffdc_14.11.19_13.33.20.0.log.

Finding information about integration

To ensure that error information is logged in detail when you deploy a solution that contains SPSS® integration, set the logging level for the predictive scoring agent to fine. Set the logging level by adding a property to the server.xml file in the server folder. For example:

<logging traceSpecification = "com.ibm.ia.scoring*=fine" />

You can set the logging level to fine for the inbound connectivity class to trace imported events when a solution is receiving and monitoring WebSphere® Message Broker or IBM® Integration Bus events. For example:

<logging traceSpecification = "com.ibm.ia.connectivity.inbound*=fine" />
In the resulting log file, search for key phrases to locate information about incoming events, as shown in the following table.

Table 2. Key strings in the log filesString to search forGives information aboutXML message receivedThe arrival of an original XML event.Classifier match for transformationMatched event types.XML message discardedA message that came into the server but was discarded because the classifier did not match the monitored event types.Discarding a message received by the endpointMessage that was transformed but not recognized or processed by Insight Server.

Finding information about aggregates

When global and entity aggregates are included in a solution project, the log files include information about the type of aggregates that are active. For entity aggregates, the log file includes statistics about aggregation activity for each job run. To retain the most detailed log information, set the logging level for the aggregates to fine. Search the log files for the key phrase Entity Query Job to locate job statistics information.

Finding information about persistence

Set the logging level for the persistence features to fine. For example:

<logging traceSpecification = "com.ibm.ia.persistence*=fine" />
Look in the trace.log file, the console.log file, and the messages.log file for information about persistence errors.

Note: Persistence errors are included in the messages that are prefixed with the string CWMBE.

Table 3. Key strings in the log filesString to search forGives information aboutORA-12519, TNS:no appropriate service handler foundA refused connection to an Oracle database is resolved by increasing the number of Oracle processes.

Finding information about missing packages

You can find information about missing packages in the Liberty server trace.log file. When your solution project uses JRE packages that are not Java™ packages, this file might contain error logs after you deploy the solution. For example:

00000026 org.apache.aries.blueprint.container.BlueprintContainerImpl  E Unable  to start blueprint container for bundle 
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable  to instantiate components 
Caused by: java.lang.NoClassDefFoundError: <package>.

To resolve this error, you must import manually all the non-Java packages from the JRE bundle in the manifest file of the solution project. For example, you add the following statement to import the java.naming package:

Import-Package: javax.naming

Finding information about degraded scheduling

If a rule that refers to the variable now cannot resolve a time constraint, the rule agent triggers a new event to reevaluate the constraint every 30 minutes. The triggered event assigns the iteration algorithm to evaluate the time constraint. More often than not, when this algorithm is used it iterates for long periods (hence the name) and degrades the performance of the system.

When an iteration algorithm is triggered, the logs include a CWMBF3003W message and the string evaluateObjectMethod0 Iteration Algorithm. The log file includes the warning message as soon as the algorithm is used, and every 30 minutes thereafter if the evaluation continues to be unresolved.

In Insight Monitor, the degradation of the system can be detected by comparing the event count with the number of scheduled processes. A large difference between these numbers in favor of scheduled processing is likely to mean that the system is degraded. By using Insight Monitor, you can identify the offending agent and the event type that is rescheduled every 30 minutes. From this information, you can find the rule that is likely to be the cause of the degradation.

Degradation is known to occur as a result of using rules without a when part. If you can remove rules without a when part, or replace these types of rules with a Java agent or replace now with a time stamp for example, then you reduce the risk of degradation. For example, the following constraint uses now:

there is no interaction during the period of 1 day before now

Replace now by the time stamp of the incoming event:

there is no interaction during the period of 1 day before the time stamp of this event

Pattern matching arrays in rules without a when part can also cause a degraded schedule. Combining a constraint that tests values of an array in a rule that has no when part increases the risk of triggering an indefinite schedule.

In all cases, if you suspect that your solution has a degraded schedule then contact support to get the best advice on how to resolve it.

How do I find error log files?

Press CTRL + F for Windows or Command + F for MacOS to open the search bar on your web browser. Type log_errors to find the log_errors row. If the value is Off, then the PHP error logging is disabled.

Where is the log file located?

Most log files are located in the /var/log/ directory. Some applications such as httpd and samba have a directory within /var/log/ for their log files. You may notice multiple files in the log file directory with numbers after them. These are created when the log files are rotated.

Where is error_log?

conf and search for error_log. It could be listed as either /var/log/httpd/error_log or /var/log/apache2/error_log , but it might also be listed as simply logs/error_log . In this case it is a relative path, which means it will be under /etc/httpd/logs/error_log .