-
Notifications
You must be signed in to change notification settings - Fork 5
/
SPDebug.ml
21 lines (18 loc) · 1.14 KB
/
SPDebug.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(***********************************************************************)
(* *)
(* Compcert Extensions *)
(* *)
(* Jean-Baptiste Tristan *)
(* *)
(* All rights reserved. This file is distributed under the terms *)
(* described in file ../../LICENSE. *)
(* *)
(***********************************************************************)
open Unix
let tm = localtime (time ());;
let name = "debug/" ^ (string_of_int tm.tm_year) ^ "-" ^(string_of_int tm.tm_mon) ^ "-" ^(string_of_int tm.tm_mday) ^
"-" ^(string_of_int tm.tm_hour) ^"-" ^(string_of_int tm.tm_min) ^ "-" ^(string_of_int tm.tm_sec) ^ "/";;
mkdir name 0o777;;
Printf.printf "Debug informations: %s \n" name ;;
let dc = open_out (name ^ "debug.log");;
let () = at_exit(fun () -> close_out dc);;