Highlights
- An Artisan-style console.
listgroups commands by namespace,help <command>shows a long description and worked examples, and every command accepts the same global options:-v,-vvand-vvv,-q,--ansiand--no-ansi,-nand--env. - Logging with components and daily files. The new
diarymodule sends every log record through a named component (http,db,river,serve,queueand one per plugin), redacts secrets on the console and writes warnings and up tostorage/logs/summer-YYYY-MM-DD.log, kept for 14 days. Configure it inconfig/log.yaml. - Startup summaries and shutdown reports.
serveopens with a compact block (version, environment, URL, admin, database host and migration state, plugins, queue, scheduler, mail, cache, realtime and search) and closes on Ctrl+C with a report of requests served and drained, worker jobs and uptime.queue:workandschedule:rundo the same.
Added
list --format=jsonand help with examples for every framework command and everysummertool command.- Error blocks with a hint where the framework knows the fix: an empty or unreachable database, an invalid
app.key, a missing uploads bucket, pending migrations, and running an application binary or asummer make:command from the wrong directory. --jsononmigrate:status,key:generate,route:list,admin:token:create,admin:token:list,admin:token:scopesandwebsockets:health.--pretendonmigrate,migrate:rollbackanddeferred:purge, which show what would change without writing.--forceonmigrate,migrate:rollback,deferred:purgeandqueue:clear, which skips the production confirmation.- Result lines:
Applied N migrationsorNothing to migrate,Rolled back <id> of <plugin>,Cleared N jobs from <queue>,Built bin/<app> in <time>andCreated <path>for each scaffolded file. - Spinners, progress bars and prompts behind the console output, so they disappear under
-qand off a terminal. - For plugin authors:
bonfire.Example,Command.Long,Command.ExamplesandCommand.Hidden;bonfire.CheckDocsto test that commands are documented;bonfire.WithHint,bonfire.Reportedandbonfire.Usagefor errors;diary.For("<component>")for a plugin's own logger.
Changed
- Run
summer buildafter you move to 0.4: the generatedmain.gonow sets up logging before the configuration is read, parses the global options and returns the new exit codes. - Two commands with the same name, or a command flag named like a global option, stop the binary at start-up with an error naming it.
- Daily log files are on by default. The
storage/logsdirectory must be writable; setlog.default: consoleto keep console-only logging. - The request log is on by default: one record per request with the route pattern (never the path), status, duration and request id. Silence it with
components: {http: warn}or turn it off withhttp.access_log: false. - GORM logs through component
dband no longer logs record-not-found; River logs through componentriver, warnings and up by default. - A failed command exits 1 and a usage error (unknown command or flag, wrong number of arguments) exits 2.
-qhides information lines, spinners and progress bars, but still prints the data a command exists to produce: tokens, keys and--jsonoutput.migrate,migrate:rollback,deferred:purgeandqueue:clearask for confirmation in production on an interactive terminal only; deploy scripts over SSH run as before.- Off a terminal,
servelogs astartup summaryrecord and keeps thelistening on <addr>line that scripts wait for.
Fixed
summer devnow runsbin/<app> serve; before, it started the binary without a command, which printed the help and stopped.summer devstops the old server before it starts the rebuilt one, so the restart no longer fails on a busy port.summer devexits 0 after Ctrl+C with a short report instead of printing the cancellation as an error.
See "Upgrading to 0.4" in the upgrading guide for the full list.