Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[cleanup] Base: remove warning

  • Loading branch information...
commit 939bb215f330b6a6e8a2967b3b51b3257d6e1234 1 parent 34d11e6
Raja authored
View
2  database/db3/io/fileIo.ml
@@ -103,7 +103,7 @@ struct
(match mode with
| Create ->
if Sys.file_exists f then
- (#<If> Base.warning (Printf.sprintf "New db, purge: deleting file %s" f) #<End>;
+ (#<If> Logger.warning "New db, purge: deleting file %s" f #<End>;
Sys.remove f);
make_channel Create f
| mode -> make_channel mode f)
View
3  libbase/base.ml
@@ -101,5 +101,4 @@ module String = BaseString
module Utf8 = BaseUtf8
(* deprecated *)
-let error = failwith
-let warning ?level:_ s = Printf.eprintf "DEPRECATED WARNING: %s" s
+let error = failwith
View
5 libbase/base.mli
@@ -145,11 +145,6 @@ module Utf8 : module type of BaseUtf8
val sprintf : ('a, unit, string) format -> 'a
(**
- deprecated jlog. is implemented with function [ignore]
-*)
-val warning : ?level:int -> string -> unit
-
-(**
deprecated error. is implemeted with a failwith
*)
val error : string -> 'a
View
9 libbase/xml.ml
@@ -253,11 +253,10 @@ let build_ids ?(tag="id") xml =
fun id node (acc, err) ->
if StringMap.mem tag node.npars then
let (Value value) = StringMap.find tag node.npars in
- StringMap.add value id acc,
- (StringMap.mem value acc)
- (* Base.warning_if_true (StringMap.mem value acc) *)
- (* (Printf.sprintf "id %s is defined several times" value) *)
- or err
+ let mem = StringMap.mem value acc in
+ #<If> if mem then
+ debug "Warning: id %s is defined several times" value #<End>;
+ StringMap.add value id acc, mem or err
else (acc, err)
) xml.nodes (StringMap.empty, false)
View
4 opabsl/mlbsl/bslPervasives.ml
@@ -132,7 +132,7 @@ let webutils_server_side () = true
##register stop: -> 'a
let stop () =
- Base.warning "BslSyslog.stop has been called : shutting down application ...";
+ Logger.warning "BslSyslog.stop has been called : shutting down application ...";
ServerLib.do_exit 1
@@ -147,7 +147,7 @@ let rec never_do_anything _ = Obj.magic never_do_anything
##register warning : string -> void
let warning s =
sync_to_print_on stderr;
- Base.warning s
+ Logger.warning "%s" s
##register jlog : string -> void
let jlog s =
Please sign in to comment.
Something went wrong with that request. Please try again.