Copyright © 2009-2023 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
context() = #context{cowreq = cowboy_req:req() | undefined, cowenv = cowboy_middleware:env() | undefined, site = atom(), controller_module = atom() | undefined, client_id = binary() | undefined, client_topic = mqtt_sessions:topic() | undefined, routing_id = binary() | undefined, acl = term() | admin | undefined, acl_is_read_only = boolean(), user_id = integer() | authenticated | undefined, render_state = undefined | z_render:render_state(), db = {atom(), atom()} | undefined, dbc = pid() | undefined, language = [atom()], tz = binary(), props = map(), depcache = pid() | atom(), dispatcher = pid() | atom(), template_server = pid() | atom(), scomp_server = pid() | atom(), dropbox_server = pid() | atom(), pivot_server = pid() | atom(), module_indexer = pid() | atom(), translation_table = atom()}
environment() = development | test | acceptance | production | education | backup
qvalue() = binary() | string() | #upload{filename = binary() | undefined, tmpfile = file:filename_all() | undefined, tmpmonitor = undefined | pid(), data = binary() | undefined, mime = binary() | undefined} | term()
severity() = debug | info | notice | warning | error | fatal
trans() = #trans{tr = [{atom(), binary()}]}
validation_error() = invalid | novalue | {script, iodata()} | novalidator | string()
c/1 | Return a new context. |
compile/0 | (Re)make all erlang source modules with the supplied compile options. |
debug/2 | Log a debug message to the logs and the database, with extra meta data. |
debug/3 | |
debug/4 | |
debug_msg/2 | Echo and return a debugging value. |
dispatch_list/1 | Return the complete dispatch information for the site. |
dispatch_path/2 | Shell command: dispatch a path, return trace. |
dispatch_url/1 | Dispatch an URL - find matching site and dispatch the path. |
error/2 | Log a error to the logs and the database, with extra meta data. |
error/3 | |
error/4 | |
fatal/2 | Log a fatal error to the logs and the database, with extra meta data. |
fatal/3 | |
fatal/4 | |
flush/0 | Reset all caches, reload the dispatch rules and rescan all modules. |
flush/1 | |
info/2 | Log an informational message to the logs and the database, with extra meta data. |
info/3 | |
info/4 | |
ld/0 | Reload all changed Erlang modules. |
ld/1 | Reload an Erlang module. |
log/3 | |
m/0 | (Re)make all erlang source modules and reset the caches. |
n/2 | Send a notification. |
n1/2 | Send a notification to the first observer. |
notice/2 | Log a notice to the logs and the database, with extra meta data. |
notice/3 | |
notice/4 | |
open/1 | Open a site in Chrome or the default browser(macOS). |
open_secure/1 | Open a site in a new fresh Chrome. |
reindex/0 | Reindex all sites, find new files. |
restart/0 | Full restart of Zotonic. |
restart/1 | Restart a site. |
shell_restartsite/1 | Shell commands: stop a site. |
shell_startsite/1 | Shell commands: start a site. |
shell_stopsite/1 | Shell commands: stop a site. |
start/1 | Start a site. |
stop/1 | Stop a site. |
warning/2 | Log a warning to the logs and the database, with extra meta data. |
warning/3 | |
warning/4 |
c(Site::atom()) -> z:context()
Return a new context
compile() -> any()
(Re)make all erlang source modules with the supplied compile options. Do not reset the caches.
debug(Msg, Context) -> any()
Log a debug message to the logs and the database, with extra meta data. To add the current source location, use the ?zDebug macro.
debug(Msg, Meta, Context) -> any()
debug(Format, Args, Meta, Context) -> any()
debug_msg(Msg, Meta) -> any()
Echo and return a debugging value. This is useful for adding debug anywhere in the code, as the passed argument is also returned. Example: foo( ?DEBUG(Arg) ) will add Arg as a notice to the logs and still call foo(Arg).
dispatch_list(SiteOrContext) -> any()
Return the complete dispatch information for the site.
dispatch_path(Path, Site) -> any()
Shell command: dispatch a path, return trace
dispatch_url(Url) -> any()
Dispatch an URL - find matching site and dispatch the path
error(Msg, Context) -> any()
Log a error to the logs and the database, with extra meta data. To add the current source location, use the ?zError macro.
error(Msg, Meta, Context) -> any()
error(Format, Args, Meta, Context) -> any()
fatal(Msg, Context) -> any()
Log a fatal error to the logs and the database, with extra meta data. To add the current source location, use the ?zError macro.
fatal(Msg, Meta, Context) -> any()
fatal(Format, Args, Meta, Context) -> any()
flush() -> ok
Reset all caches, reload the dispatch rules and rescan all modules.
flush(Site::atom() | z:context()) -> ok
info(Msg, Context) -> any()
Log an informational message to the logs and the database, with extra meta data. To add the current source location, use the ?zInfo macro.
info(Msg, Meta, Context) -> any()
info(Format, Args, Meta, Context) -> any()
ld() -> any()
Reload all changed Erlang modules
ld(Module) -> any()
Reload an Erlang module
log(Level::severity(), Meta::proplists:proplist() | map(), Context::z:context()) -> ok
m() -> any()
(Re)make all erlang source modules and reset the caches.
n(Msg, Context) -> any()
Send a notification
n1(Msg, Context) -> any()
Send a notification to the first observer
notice(Msg, Context) -> any()
Log a notice to the logs and the database, with extra meta data. To add the current source location, use the ?zNotice macro.
notice(Msg, Meta, Context) -> any()
notice(Format, Args, Meta, Context) -> any()
open(Site) -> any()
Open a site in Chrome or the default browser(macOS)
open_secure(Site) -> any()
Open a site in a new fresh Chrome
reindex() -> any()
Reindex all sites, find new files.
restart() -> any()
Full restart of Zotonic
restart(Site) -> any()
Restart a site
shell_restartsite(Site) -> any()
Shell commands: stop a site
shell_startsite(Site) -> any()
Shell commands: start a site
shell_stopsite(Site) -> any()
Shell commands: stop a site
start(Site) -> any()
Start a site
stop(Site) -> any()
Stop a site
warning(Msg, Context) -> any()
Log a warning to the logs and the database, with extra meta data. To add the current source location, use the ?zWarning macro.
warning(Msg, Meta, Context) -> any()
warning(Format, Args, Meta, Context) -> any()
Generated by EDoc