1. Technical Field
The present invention relates generally to computer network environments, and more specifically to logging services in distributed, multilevel architectures.
2. Description of Related Art
Computers have come to epitomize modern life. Today, computers are used for much more than simply computing. For example, banking transactions are often conducted through automated teller machines (ATMs) connected via networks to central processing centers that keep track of transactions while computerized telephone switching systems manage the millions of calls generated each day. Furthermore, computers are integral to both peoples personal life as well as to their business life.
As computers became more widespread in the workplace, new ways to harness their potential developed. Thus, with increasing use of computers for tasks other than simple computing has come an increase in complexity. Furthermore, as computers are increasingly networked together to provide even more functionality, that complexity is increased exponentially. To keep these networked computers operating and, therefore, ensure that ATM transactions, telephone calls, and business continue to operate smoothly, requires the work of administrators to monitor the systems and correct errors as they occur.
One tool that aids administrators in keeping networks operational is logging. Logging is the process of recording system events so that those actions can be reviewed later. Thus, if an error occurs, that error may be logged with other information to allow an administrator to discover the source of the problem and correct it. However, currently, logging is not available during certain periods when the logging depends on a component that is not ready. This occurs during the time period prior to initialization of all the components needed, such as during hardware firmware BIOS boot, native OS boot, JVM boot, ORB boot, prior to initialization of components needed by the logging system, and during initialization of the logging system. This state also occurs during the time period for which the network has failed or some other failure event yields component dependencies. Another situation in which logging messages to a logging component cannot be accomplished is when the caller is not allowed to call the callee. This is to prevent the case where one component that is used by logging is not reentrant (config calls logger which calls config). Global locking approach until all dependencies are satisfied is not an option since messages are desired from all components in all stages of a distributed boot of kernel services. Therefore, it would be desirable to have a logging system that is capable of logging during initialization periods and situations in which the a component cannot be called by the logger.
The present invention provides a method, system, and computer program product for logging events in a data processing system. In one embodiment, responsive to a determination that a situation exists preventing a primary logger from executing a logging task, a swappable adaptive logger is created, which in turn is pointed to a boot logger created by a swappable adaptive log engine. Event information is then logged to the boot logger. For example, the boot logger may write event information to memory or to a file if the logging database is unavailable. When the primary logger becomes configured and functional, the swappable adaptive logger swaps the boot logger for the primary logger and begins writing event information to the primary logger.