alox-jason 0.0.30 → 0.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/exec/_jason +29 -21
- metadata +1 -2
- data/exec/_log4sh +0 -3842
data/exec/_jason
CHANGED
@@ -35,26 +35,6 @@ function parse_command_line {
|
|
35
35
|
return 0
|
36
36
|
}
|
37
37
|
|
38
|
-
function configure_logging {
|
39
|
-
if [[ -n "${NO_LOG4SH:-}" ]]; then
|
40
|
-
return 0
|
41
|
-
fi
|
42
|
-
|
43
|
-
LOG4SH_CONFIGURATION=none require _log4sh
|
44
|
-
|
45
|
-
log4sh_resetConfiguration
|
46
|
-
|
47
|
-
# set the global logging level to INFO
|
48
|
-
logger_setLevel INFO
|
49
|
-
|
50
|
-
# add and configure a FileAppender that outputs to STDERR, and activate the
|
51
|
-
# configuration
|
52
|
-
logger_addAppender stderr
|
53
|
-
appender_setType stderr FileAppender
|
54
|
-
appender_file_setFile stderr STDERR
|
55
|
-
appender_activateOptions stderr
|
56
|
-
}
|
57
|
-
|
58
38
|
function ryaml {
|
59
39
|
ruby -ryaml -e 'def ps x; unless x.nil?; puts (x.class == String || x.class == Fixnum) ? x : x.to_yaml; end; end; ps ARGV[1..-1].inject(YAML.load(File.read(ARGV[0]))) {|acc, key| acc[acc.class == Array ? key.to_i : (m = key.match(/^:(.*)$/); m ? m[1].to_sym : key)] }' "$@" 2>&-
|
60
40
|
}
|
@@ -129,8 +109,36 @@ function _main {
|
|
129
109
|
__jason__='y'
|
130
110
|
|
131
111
|
require _shflags
|
112
|
+
}
|
113
|
+
|
114
|
+
function logger_base {
|
115
|
+
local level="$1"; shift
|
116
|
+
|
117
|
+
printf '[%s] %s\r\n' "$level" "$*"
|
118
|
+
}
|
119
|
+
|
120
|
+
function logger_trace {
|
121
|
+
logger_base "TRACE" "$@"
|
122
|
+
}
|
123
|
+
|
124
|
+
function logger_debug {
|
125
|
+
logger_base "DEBUG" "$@"
|
126
|
+
}
|
127
|
+
|
128
|
+
function logger_info {
|
129
|
+
logger_base "INFO" "$@"
|
130
|
+
}
|
131
|
+
|
132
|
+
function logger_warn {
|
133
|
+
logger_base "WARN" "$@"
|
134
|
+
}
|
135
|
+
|
136
|
+
function logger_error {
|
137
|
+
logger_base "ERROR" "$@"
|
138
|
+
}
|
132
139
|
|
133
|
-
|
140
|
+
function logger_fatal {
|
141
|
+
logger_base "FATAL" "$@"
|
134
142
|
}
|
135
143
|
|
136
144
|
_main "$@"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alox-jason
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -21,7 +21,6 @@ extensions: []
|
|
21
21
|
extra_rdoc_files: []
|
22
22
|
files:
|
23
23
|
- exec/_jason
|
24
|
-
- exec/_log4sh
|
25
24
|
- exec/_shflags
|
26
25
|
- exec/_sub
|
27
26
|
homepage: https://github.com/destructuring/jason
|