Commit efe7ae6fdddd16e306241ce21e3b61610970669c
1 parent
408c14ba
Adding logger outputting when starting HTTP server
Showing
1 changed file
with
6 additions
and
4 deletions
Show diff stats
calexium_lib/web/CXM_making_a_web_site.anubis
| @@ -45,6 +45,7 @@ | @@ -45,6 +45,7 @@ | ||
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | read tools/basis.anubis | 47 | read tools/basis.anubis |
| 48 | +read system/logger.anubis | ||
| 48 | read CXM_common.anubis | 49 | read CXM_common.anubis |
| 49 | read CXM_multihost_http_server.anubis | 50 | read CXM_multihost_http_server.anubis |
| 50 | read CXM_mime.anubis | 51 | read CXM_mime.anubis |
| @@ -2291,7 +2292,8 @@ public define One | @@ -2291,7 +2292,8 @@ public define One | ||
| 2291 | Int32 https_port, // usually: 443 | 2292 | Int32 https_port, // usually: 443 |
| 2292 | String ssl_certificate_common_name, | 2293 | String ssl_certificate_common_name, |
| 2293 | List(Web_Site) web_sites, // web sites to be started | 2294 | List(Web_Site) web_sites, // web sites to be started |
| 2294 | - Var(Bool) shutdown_required | 2295 | + Var(Bool) shutdown_required, |
| 2296 | + Logger log | ||
| 2295 | ) = | 2297 | ) = |
| 2296 | if (Start_Web_Sites_Result)start_web_sites(ip_address, | 2298 | if (Start_Web_Sites_Result)start_web_sites(ip_address, |
| 2297 | http_port, | 2299 | http_port, |
| @@ -2300,9 +2302,9 @@ public define One | @@ -2300,9 +2302,9 @@ public define One | ||
| 2300 | web_sites, | 2302 | web_sites, |
| 2301 | shutdown_required) is | 2303 | shutdown_required) is |
| 2302 | { | 2304 | { |
| 2303 | - cannot_bind_to_port(n) then print("Cannot bind to port: "+n+"\n"), | ||
| 2304 | - cannot_bind_to_port(n,m) then print("Cannot bind to ports: "+n+", "+m+"\n"), | ||
| 2305 | - ok(s1,s2) then print("Servers started.\n") | 2305 | + cannot_bind_to_port(n) then logError(log, "Cannot bind to port: "+n), |
| 2306 | + cannot_bind_to_port(n,m) then logError(log, "Cannot bind to ports: "+n+", "+m), | ||
| 2307 | + ok(s1,s2) then logInfo(log, "Servers started.") | ||
| 2306 | }. | 2308 | }. |
| 2307 | 2309 | ||
| 2308 | 2310 |