-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
khabinov
committed
Sep 12, 2012
1 parent
ba6c76d
commit 92fd653
Showing
2 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
%% Same logic as in jerr.erl is used here | ||
%% | ||
-module(epgsql_pool_log). | ||
|
||
-export([ | ||
log_info/2, | ||
log_info/3, | ||
log_error/2, | ||
log_error/3, | ||
log_warning/2, | ||
log_warning/3, | ||
log_debug/2, | ||
log_debug/3 | ||
]). | ||
|
||
new_format(Area, Format) -> | ||
"[" ++ atom_to_list(Area) ++ "] " ++ Format ++ "~n". | ||
|
||
log_info(Area, Format) -> log_info(Area, Format, []). | ||
log_info(Area, Format, Args) -> | ||
error_logger:info_msg(new_format(Area, Format), Args). | ||
|
||
log_error(Area, Format) -> log_error(Area, Format, []). | ||
log_error(Area, Format, Args) -> | ||
error_logger:error_msg(new_format(Area, Format), Args). | ||
|
||
log_warning(Area, Format) -> log_warning(Area, Format, []). | ||
log_warning(Area, Format, Args) -> | ||
error_logger:warning_msg(new_format(Area, Format), Args). | ||
|
||
log_debug(Area, Format) -> log_debug(Area, Format, []). | ||
log_debug(Area, Format, Args) -> | ||
error_logger:ingo_msg("DEBUG: " ++ new_format(Area, Format), Args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters