Skip to content

Commit 811bb35

Browse files
committed
FIX: missing log traces in boot sequence
1 parent c8a5936 commit 811bb35

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/mezz/sys-start.reb

+17-17
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ REBOL [
1919

2020
start: func [
2121
"INIT: Completes the boot sequence. Loads extras, handles args, security, scripts."
22-
/local dir file tmp script-path script-args code ver
23-
] bind [ ; context is: system/options
22+
/local file tmp script-path script-args code ver
23+
] bind [ ; context is: system/options (must use full path sys/log/.. as there is options/log too!)
2424

2525
;** Note ** We need to make this work for lower boot levels too!
2626

2727
;-- DEBUG: enable these lines for debug or related testing
28-
log/debug 'REBOL ["Starting... boot level:" boot-level]
28+
sys/log/debug 'REBOL ["Starting... boot level:" boot-level]
2929
;trace 1
3030
;crash-here ; test error handling (undefined word)
3131

@@ -55,25 +55,25 @@ start: func [
5555
if any [do-arg script] [quiet: true]
5656

5757
;-- Set up option/paths for /path, /boot, /home, and script path (for SECURE):
58-
log/more 'REBOL ["Initial path:" path]
59-
log/more 'REBOL ["Initial boot:" boot]
60-
;log/more 'REBOL ["Initial home:" home] ; always NONE at this state!
58+
sys/log/more 'REBOL ["Initial path:" path]
59+
sys/log/more 'REBOL ["Initial boot:" boot]
60+
;sys/log/more 'REBOL ["Initial home:" home] ; always NONE at this state!
6161
;- 1. /path - that is current directory (resolved from C as a part of args processing)
6262
; nothing to do here
6363
;- 2. /boot - path to executable (must handle relative paths)
6464
boot: any [to-real-file boot boot]
6565
unless exists? boot [
6666
; the executable must be inside one of the system PATH directories...
6767
file: second split-path boot
68-
foreach tmp parse any [get-env "PATH" ""] pick ";:" system/platform = 'Windows [
69-
dir: dirize as file! tmp
70-
if exists? tmp: dir/:file [
68+
foreach dir parse any [get-env "PATH" ""] pick ";:" system/platform = 'Windows [
69+
dir: dirize as file! dir
70+
if exists? probe tmp: dir/:file [
7171
boot: tmp
7272
break
7373
]
7474
]
7575
if boot <> tmp [
76-
log/error 'REBOL "Path to executable was not resolved!"
76+
sys/log/error 'REBOL "Path to executable was not resolved!"
7777
boot: none
7878
]
7979
]
@@ -114,7 +114,7 @@ start: func [
114114
; For example: mods, plus, host, and full
115115
if boot-level [
116116
load-boot-exts
117-
log/debug 'REBOL "Init mezz plus..."
117+
sys/log/debug 'REBOL "Init mezz plus..."
118118

119119
do bind-lib boot-mezz
120120
boot-mezz: 'done
@@ -132,7 +132,7 @@ start: func [
132132
]
133133

134134
if boot-host [
135-
log/debug 'REBOL "Init host code..."
135+
sys/log/debug 'REBOL "Init host code..."
136136
;probe load boot-host
137137
do load boot-host
138138
boot-host: none
@@ -167,23 +167,23 @@ start: func [
167167
;-- Evaluate rebol.reb script:
168168
;@@ https://github.com/Oldes/Rebol-issues/issues/706
169169
tmp: first split-path boot
170-
log/info 'REBOL ["Checking for rebol.reb file in" tmp]
170+
sys/log/info 'REBOL ["Checking for rebol.reb file in" tmp]
171171

172172
if all [
173173
#"/" = first tmp ; only if we know absolute path
174174
exists? tmp/rebol.reb
175175
][
176-
try/except [do tmp/rebol.reb][log/error 'REBOL system/state/last-error]
176+
try/except [do tmp/rebol.reb][sys/log/error 'REBOL system/state/last-error]
177177
]
178178

179179
;-- Make the user's global context:
180180
tmp: make object! 320
181181
append tmp reduce ['REBOL :system 'lib-local :tmp]
182182
system/contexts/user: tmp
183183

184-
log/info 'REBOL ["Checking for user.reb file in" home]
184+
sys/log/info 'REBOL ["Checking for user.reb file in" home]
185185
if exists? home/user.reb [
186-
try/except [do home/user.reb][log/error 'REBOL system/state/last-error]
186+
try/except [do home/user.reb][sys/log/error 'REBOL system/state/last-error]
187187
]
188188

189189

@@ -208,7 +208,7 @@ start: func [
208208
; /path dir is where our script gets started.
209209
change-dir first script-path
210210
either exists? second script-path [
211-
log/info 'REBOL ["Evaluating:" script]
211+
sys/log/info 'REBOL ["Evaluating:" script]
212212
code: load/header/type second script-path 'unbound
213213
; update system/script (Make into a function?)
214214
system/script: make system/standard/script [

0 commit comments

Comments
 (0)