Skip to content

Commit 5e06fd8

Browse files
committed
FIX: changing some of the log traces so they all starts with capital letter
1 parent aba9869 commit 5e06fd8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/mezz/prot-http.r

+14-14
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,18 @@ sync-op: func [port body /local state encoding content-type code-page tmp][
9494
parse content-type ["text/" [thru "charset=" copy code-page to end] to end]
9595
][
9696
unless code-page [code-page: "utf-8"]
97-
sys/log/info 'HTTP ["trying to decode from code-page:^[[m" code-page]
97+
sys/log/info 'HTTP ["Trying to decode from code-page:^[[m" code-page]
9898
if string? tmp: try [iconv body code-page][ body: tmp ]
9999
]
100100

101101
if state/close? [
102-
sys/log/more 'HTTP ["closing port for:^[[m" port/spec/ref]
102+
sys/log/more 'HTTP ["Closing port for:^[[m" port/spec/ref]
103103
close port
104104
]
105105
body
106106
]
107107
read-sync-awake: func [event [event!] /local error][
108-
sys/log/debug 'HTTP ["read-sync-awake:" event/type]
108+
sys/log/debug 'HTTP ["Read-sync-awake:" event/type]
109109
switch/default event/type [
110110
connect ready [
111111
do-request event/port
@@ -144,7 +144,7 @@ http-awake: func [event /local port http-port state awake res][
144144
if any-function? :http-port/awake [state/awake: :http-port/awake]
145145
awake: :state/awake
146146

147-
sys/log/debug 'HTTP ["awake:^[[1m" event/type "^[[22mstate:^[[1m" state/state]
147+
sys/log/debug 'HTTP ["Awake:^[[1m" event/type "^[[22mstate:^[[1m" state/state]
148148

149149
switch/default event/type [
150150
read [
@@ -255,7 +255,7 @@ do-request: func [
255255
info/headers: info/response-line: info/response-parsed: port/data:
256256
info/size: info/date: info/name: none
257257

258-
sys/log/info 'HTTP ["do-request:^[[22m" spec/method spec/host spec/path]
258+
sys/log/info 'HTTP ["Request:^[[22m" spec/method spec/host spec/path]
259259

260260
write port/state/connection make-http-request spec/method enhex any [spec/path %/] spec/headers spec/content
261261
]
@@ -285,7 +285,7 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
285285
all [
286286
d1: find conn/data #{0A}
287287
d2: find/tail d1 #{0A0A}
288-
sys/log/debug 'HTML "server using malformed line separator of #{0A0A}"
288+
sys/log/debug 'HTML "Server using malformed line separator of #{0A0A}"
289289
]
290290
]
291291
][
@@ -345,7 +345,7 @@ check-response: func [port /local conn res headers d1 d2 line info state awake s
345345
]
346346
]
347347

348-
sys/log/debug 'HTTP ["check-response:" info/response-parsed]
348+
sys/log/debug 'HTTP ["Check-response:" info/response-parsed]
349349

350350
;?? info/response-parsed
351351
;?? spec/method
@@ -512,12 +512,12 @@ check-data: func [port /local headers res data out chunk-size mk1 mk2 trailer st
512512
conn: state/connection
513513
res: false
514514

515-
sys/log/more 'HTTP ["check-data; bytes:^[[m" length? conn/data]
515+
sys/log/more 'HTTP ["Check-data; bytes:^[[m" length? conn/data]
516516

517517
case [
518518
headers/transfer-encoding = "chunked" [
519519
data: conn/data
520-
sys/log/more 'HTTP ["chunked data: " length? data mold copy/part data 30]
520+
sys/log/more 'HTTP ["Chunked data: " length? data mold copy/part data 30]
521521
;clear the port data only at the beginning of the request --Richard
522522
unless port/data [ port/data: make binary! 32000 ]
523523
out: port/data
@@ -527,7 +527,7 @@ check-data: func [port /local headers res data out chunk-size mk1 mk2 trailer st
527527
crlfbin mk1: to end
528528
][
529529
chunk-size: to integer! to issue! to string! chunk-size
530-
sys/log/more 'HTTP ["chunk-size:^[[m" chunk-size]
530+
sys/log/more 'HTTP ["Chunk-size:^[[m" chunk-size]
531531
either chunk-size = 0 [
532532
if parse/all mk1 [
533533
crlfbin (trailer: "") to end | copy trailer to crlf2bin to end
@@ -603,7 +603,7 @@ sys/make-scheme [
603603
read: func [
604604
port [port!]
605605
][
606-
sys/log/debug 'HTTP "read"
606+
sys/log/debug 'HTTP "READ"
607607
either any-function? :port/awake [
608608
unless open? port [cause-error 'Access 'not-open port/spec/ref]
609609
if port/state/state <> 'ready [http-error "Port not ready"]
@@ -617,7 +617,7 @@ sys/make-scheme [
617617
port [port!]
618618
value
619619
][
620-
sys/log/debug 'HTTP "write"
620+
sys/log/debug 'HTTP "WRITE"
621621
;?? port
622622
unless any [block? :value binary? :value any-string? :value][value: form :value]
623623
unless block? value [value: reduce [[Content-Type: "application/x-www-form-urlencoded; charset=utf-8"] value]]
@@ -636,7 +636,7 @@ sys/make-scheme [
636636
port [port!]
637637
/local conn
638638
][
639-
sys/log/debug 'HTTP ["open, state:" port/state]
639+
sys/log/debug 'HTTP ["OPEN, state:" port/state]
640640
if port/state [return port]
641641
if none? port/spec/host [http-error "Missing host address"]
642642
port/state: context [
@@ -672,7 +672,7 @@ sys/make-scheme [
672672
close: func [
673673
port [port!]
674674
][
675-
sys/log/debug 'HTTP "close"
675+
sys/log/debug 'HTTP "CLOSE"
676676
if port/state [
677677
close port/state/connection
678678
port/state/connection/awake: none

0 commit comments

Comments
 (0)