Browse files

[enhance] stdlib: logs clean up

  • Loading branch information...
1 parent 6d5e19c commit d4e22c88342cca31d8ca038127ef4bdf23fbbcca @cedricss cedricss committed Sep 25, 2012
Showing with 4 additions and 7 deletions.
  1. +1 −1 lib/stdlib/apis/common/api_libs.opa
  2. +3 −6 lib/stdlib/database/dropbox/db.opa
View
2 lib/stdlib/apis/common/api_libs.opa
@@ -32,7 +32,7 @@ API_libs_private = {{
* Alias to easily manage the jlog of API modules
*/
apijlog(text:string) =
- do jlog(text)
+ do Log.debug("API", text)
void
/* -------------- */
View
9 lib/stdlib/database/dropbox/db.opa
@@ -95,8 +95,8 @@ DbDropbox = {{
* {2 Utils}
*/
- error(s) = Log.error("DbGen/Dropbox", s)
- notice(s) = Log.notice("DbGen/Dropbox", s)
+ error(s) = Log.error("DbGen/Dropbox:", s)
+ notice(s) = Log.notice("DbGen/Dropbox:", s)
uri_to_string(path) = Uri.to_string(~{path fragment=none query=[] is_directory=false is_from_root=false})
build_path(path) =
path = uri_to_string(path)
@@ -232,7 +232,6 @@ DbDropbox = {{
| {authenticated = creds} -> (
ty = @typeval('data)
read_map_opt(kty, dty) = { some = @unsafe_cast(read_map(db, creds, build_folder_path(path), kty, dty)) }
- do jlog("\ngen_read/TYPE: {OpaType.to_pretty(ty)}\n")
match ty
| {TyName_args=[kty, dty, _]; TyName_ident="ordered_map"}
| {TyName_args=[kty, dty]; TyName_ident="map"} -> read_map_opt(kty, dty)
@@ -357,9 +356,7 @@ DbDropbox = {{
@private Init = {{
- error(msg) = do Log.error("DbGen/Dropbox", msg) System.exit(1)
-
- jlog(msg) = Log.notice("DbGen/Dropbox", msg)
+ error(msg) = do Log.error("DbGen/Dropbox:", msg) System.exit(1)
open(name) =
(suffix, msg) = match name with

0 comments on commit d4e22c8

Please sign in to comment.