Edgewall Software
Modify

Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12966 closed enhancement (fixed)

initenv command should be less verbose

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.3
Component: admin/console Version:
Severity: normal Keywords: initenv trac-admin
Cc: Branch:
Release Notes:
  • The installed wiki pages are not printed to the console when creating an environment with trac-admin initenv. The information is logged at INFO level to $ENV/log/trac.log.
  • The new default is INFO level file logging to $ENV/log/trac.log.
API Changes:
Internal Changes:
  • The log_type defaults to file rather than none.
  • The log_level defaults to INFO rather than DEBUG.

Description (last modified by Ryan J Ollos)

The initenv command generates a lot of output. There is some very useful information in the output, but there is also some information that may not be needed. I tend to not read the output when it is lengthy. Therefore I think we would do our users a service by generating less output.

$trac-admin ../tracenvs/no-default-data initenv
Creating a new Trac environment at /Users/rjollos/Documents/Workspace/trac-dev/tracenvs/no-default-data

Trac will first ask a few questions about your environment
in order to initialize and prepare the project database.

 Please enter the name of your project.
 This name will be used in page titles and descriptions.

Project Name [My Project]>

 Please specify the connection string for the database to use.
 By default, a local SQLite database is created in the environment
 directory. It is also possible to use an existing MySQL or
 PostgreSQL database (check the Trac documentation for the exact
 connection string syntax).

Database connection string [sqlite:db/trac.db]>

Creating and Initializing Project
 Installing default wiki pages
  TracSearch imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracSearch
  TracInstall imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracInstall
  TracAdmin imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracAdmin
  TracCgi imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracCgi
  TracIni imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracIni
  TracEnvironment imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracEnvironment
  WikiFormatting imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiFormatting
  TracTicketsCustomFields imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracTicketsCustomFields
  TracUnicode imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracUnicode
  WikiHtml imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiHtml
  TracWiki imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracWiki
  TracAccessibility imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracAccessibility
  TracUpgrade imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracUpgrade
  WikiProcessors imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiProcessors
  TracTickets imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracTickets
  TracNotification imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracNotification
  InterWiki imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/InterWiki
  TracFineGrainedPermissions imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracFineGrainedPermissions
  InterTrac imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/InterTrac
  WikiDeletePage imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiDeletePage
  TracBatchModify imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracBatchModify
  TracImport imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracImport
  TracBackup imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracBackup
  WikiStart imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiStart
  TicketQuery imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TicketQuery
  TracPlugins imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracPlugins
  TracRoadmap imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracRoadmap
  TracGuide imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracGuide
  WikiPageNames imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiPageNames
  TracNavigation imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracNavigation
  WikiRestructuredText imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiRestructuredText
  TracModPython imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracModPython
  TracTimeline imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracTimeline
  SandBox imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/SandBox
  InterMapTxt imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/InterMapTxt
  TracBrowser imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracBrowser
  TracModWSGI imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracModWSGI
  TracChangeLog imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracChangeLog
  TracFastCgi imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracFastCgi
  WikiMacros imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiMacros
  TracQuery imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracQuery
  WikiRestructuredTextLinks imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiRestructuredTextLinks
  TracSupport imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracSupport
  TracInterfaceCustomization imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracInterfaceCustomization
  TracRevisionLog imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracRevisionLog
  TracLogging imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracLogging
  TracRepositoryAdmin imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracRepositoryAdmin
  TracChangeset imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracChangeset
  TracReports imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracReports
  TracSyntaxColoring imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracSyntaxColoring
  TracWorkflow imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracWorkflow
  TracStandalone imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracStandalone
  TracPermissions imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracPermissions
  CamelCase imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/CamelCase
  TracRss imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracRss
  WikiNewPage imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/WikiNewPage
  RecentChanges imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/RecentChanges
  PageTemplates imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/PageTemplates
  TracLinks imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TracLinks
  TitleIndex imported from /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/default-pages/TitleIndex

---------------------------------------------------------------------
Project environment for 'My Project' created.

You may now configure the environment by editing the file:

  /Users/rjollos/Documents/Workspace/trac-dev/tracenvs/no-default-data/conf/trac.ini

If you'd like to take this new project environment for a test drive,
try running the Trac standalone web server `tracd`:

  tracd --port 8000 /Users/rjollos/Documents/Workspace/trac-dev/tracenvs/no-default-data

Then point your browser to http://localhost:8000/no-default-data.
There you can also browse the documentation for your installed
version of Trac, including information on further setup (such as
deploying Trac to a real web server).

The latest documentation can also always be found on the project
website:

  http://trac.edgewall.org/

Congratulations!

I think we should remove printing the default pages, and reword some of the other content.

Attachments (0)

Change History (7)

comment:1 by Ryan J Ollos, 6 years ago

Milestone: 1.2.31.3.3
Release Notes: modified (diff)

comment:2 by Ryan J Ollos, 6 years ago

I propose that we default the log type to file and the log level to INFO. This will ensure there is a log of the environment creation.

Proposed changes in log:rjollos.git:t12966_initenv_less_verbose.

Rather than re-ordering log.LOG_TYPES and log.LOG_LEVELS, I considered adding a default keyword argument to ChoiceOption. The default argument should be placed after choices, which changes the function signature: tags/trac-1.2.2/trac/config.py@:827#L820. Therefore I opted for changes that would not touch ChoiceOption.

New output:

$ trac-admin test1 initenv "Test One" sqlite:db/trac.db
Creating a new Trac environment at /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/test1

Project environment for 'Test One' created.

You may configure the environment by editing the file:

  /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/test1/conf/trac.ini

To run the Trac standalone web server `tracd`:

  tracd --port 8000 /Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/test1

Point your browser to http://localhost:8000/test1.

Navigate to "Help/Guide" to browse the documentation for Trac,
including information on further setup (such as deploying Trac
to a real web server).

The latest documentation can also be found on the project
website:

  http://trac.edgewall.org/
Version 0, edited 6 years ago by Ryan J Ollos (next)

comment:3 by Ryan J Ollos, 6 years ago

Description: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to trunk in r16472.

comment:4 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

comment:5 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

comment:6 by Ryan J Ollos, 4 years ago

Internal Changes: modified (diff)
Release Notes: modified (diff)

comment:7 by Ryan J Ollos, 4 years ago

Description: modified (diff)
Keywords: trac-admin added

#13299 is related.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.