summaryrefslogtreecommitdiffstats
path: root/routers/init.go
Commit message (Collapse)AuthorAgeFilesLines
* Better logging (#6038) (#6095)zeripath2019-04-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Panic don't fatal on create new logger Fixes #5854 Signed-off-by: Andrew Thornton <art27@cantab.net> * partial broken * Update the logging infrastrcture Signed-off-by: Andrew Thornton <art27@cantab.net> * Reset the skip levels for Fatal and Error Signed-off-by: Andrew Thornton <art27@cantab.net> * broken ncsa * More log.Error fixes Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove nal * set log-levels to lowercase * Make console_test test all levels * switch to lowercased levels * OK now working * Fix vetting issues * Fix lint * Fix tests * change default logging to match current gitea * Improve log testing Signed-off-by: Andrew Thornton <art27@cantab.net> * reset error skip levels to 0 * Update documentation and access logger configuration * Redirect the router log back to gitea if redirect macaron log but also allow setting the log level - i.e. TRACE * Fix broken level caching * Refactor the router log * Add Router logger * Add colorizing options * Adjust router colors * Only create logger if they will be used * update app.ini.sample * rename Attribute ColorAttribute * Change from white to green for function * Set fatal/error levels * Restore initial trace logger * Fix Trace arguments in modules/auth/auth.go * Properly handle XORMLogger * Improve admin/config page * fix fmt * Add auto-compression of old logs * Update error log levels * Remove the unnecessary skip argument from Error, Fatal and Critical * Add stacktrace support * Fix tests * Remove x/sync from vendors? * Add stderr option to console logger * Use filepath.ToSlash to protect against Windows in tests * Remove prefixed underscores from names in colors.go * Remove not implemented database logger This was removed from Gogs on 4 Mar 2016 but left in the configuration since then. * Ensure that log paths are relative to ROOT_PATH * use path.Join * rename jsonConfig to logConfig * Rename "config" to "jsonConfig" to make it clearer * Requested changes * Requested changes: XormLogger * Try to color the windows terminal If successful default to colorizing the console logs * fixup * Colorize initially too * update vendor * Colorize logs on default and remove if this is not a colorizing logger * Fix documentation * fix test * Use go-isatty to detect if on windows we are on msys or cygwin * Fix spelling mistake * Add missing vendors * More changes * Rationalise the ANSI writer protection * Adjust colors on advice from @0x5c * Make Flags a comma separated list * Move to use the windows constant for ENABLE_VIRTUAL_TERMINAL_PROCESSING * Ensure matching is done on the non-colored message - to simpify EXPRESSION
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* refactor issue indexer, add some testing and fix a bug (#6131)Lunny Xiao2019-02-211-1/+2
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Refactor issue indexer (#5363)Lunny Xiao2019-02-191-1/+3
|
* Ensure error is logged on db reconnection attempts (#5780)Paul Brackin2019-01-201-1/+1
| | | Unfortunately a scoping problem was missed on the previous PR which meant that the only nil error was logged on failure to connect to the db. This pr fixes this.
* Make db connect more robust (#5738)Paul Brackin2019-01-191-4/+24
|
* fix lfs version check warning log when using ssh protocol (#5501)Lunny Xiao2018-12-191-0/+1
|
* Store OAuth2 session data in database (#3660)Lauris BH2018-04-291-1/+3
| | | | | | * Store OAuth2 session data in database * Rename table to `oauth2_session` and do not skip xormstorage initialization error
* Set session and indexers' data files rel to AppDataPath (#2192)Guillaume Dube2017-11-031-0/+2
| | | | | | | | | | * Set session and indexers' data files rel to AppDataPath The setting AppDataPath is now relative to the working directory. The session svc's PROVIDER_CONFIG now defaults to AppDataPath/data/sessions. The issue indexer's IssuePath now defaults to AppDataPath/indexers/issues.bleves. * fix bug
* Configurable SSH key exchange algorithm and MAC suite (#2806)Cum Gun2017-11-021-2/+2
|
* Code/repo search (#2582)Ethan Koenig2017-10-271-0/+1
| | | Indexed search of repository contents (for default branch only)
* Add commit count caching (#2774)Lauris BH2017-10-261-0/+3
| | | | | | | | | | * Add commit count caching * Small refactoring * Add different key prefix for refs and commits * Add configuratuion option to allow to change caching time or disable it
* Configurable SSH cipher suite (#913)spacetourist2017-10-211-2/+2
| | | | | | | | | | | | * Configurable SSH cipher suite * Update configuration file comment * Add default in settings loading code * Fix fmt and log messsage * Remove default from code as this could probably might not be good idea
* Improve issue search (#2387)Ethan Koenig2017-09-161-2/+1
| | | | | | | | | | * Improve issue indexer * Fix new issue sqlite bug * Different test indexer paths for each db * Add integration indexer paths to make clean
* Restructure markup & markdown to prepare for multiple markup language… (#2411)Lunny Xiao2017-09-161-3/+3
| | | | | | | | | | * restructure markup & markdown to prepare for multiple markup languages support * adjust some functions between markdown and markup * fix tests * improve the comments
* Fix rendering of external links (#2292)Ethan Koenig2017-08-131-0/+1
|
* Fix git hooks update to receive required arguments. Fixes #2090 (#2095)Lauris BH2017-07-021-1/+2
| | | * Changed migration calling so that migrations can use models package
* Sanitation fix from Gogs (#1461)Kim "BKC" Carlbäcker2017-04-131-1/+1
| | | | | | | | | | | | | | | | * Santiation fix from Gogs * Linting * Fix build-errors * still not working * Fix all the things! * gofmt * Add code-injection checks
* Oauth2 consumer (#679)Willem van Dreumel2017-02-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * initial stuff for oauth2 login, fails on: * login button on the signIn page to start the OAuth2 flow and a callback for each provider Only GitHub is implemented for now * show login button only when the OAuth2 consumer is configured (and activated) * create macaron group for oauth2 urls * prevent net/http in modules (other then oauth2) * use a new data sessions oauth2 folder for storing the oauth2 session data * add missing 2FA when this is enabled on the user * add password option for OAuth2 user , for use with git over http and login to the GUI * add tip for registering a GitHub OAuth application * at startup of Gitea register all configured providers and also on adding/deleting of new providers * custom handling of errors in oauth2 request init + show better tip * add ExternalLoginUser model and migration script to add it to database * link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed * remove the linked external account from the user his settings * if user is unknown we allow him to register a new account or link it to some existing account * sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers) * from gorilla/sessions docs: "Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!" (we're using gorilla/sessions for storing oauth2 sessions) * use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
* Cleanup log messagingGabriel Jackson2017-02-021-1/+1
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* Allow custom public files (#782)Thomas Boerger2017-01-281-1/+1
| | | | | | * Allow custom public files * Gofmt code, lots of places not related to this pr
* bug fixed caused by #530 (#755)Lunny Xiao2017-01-251-1/+1
|
* Search bar for issues/pulls (#530)Ethan Koenig2017-01-251-0/+2
|
* New settings option for a custom SSH host (#3763) (#446)Lunny Xiao2016-12-221-2/+2
| | | | | | * New settings option for a custom SSH host (#3763) * let default ssh listen addr empty
* Integrate templates into bindata optionally (#314)Thomas Boerger2016-12-061-1/+1
| | | Integrated optional bindata for the templates
* Get rid of bin folder within makefile, enabled TiDB (#319)Thomas Boerger2016-12-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * Get rid of the bin folder within the build process Signed-off-by: Thomas Boerger <thomas@webhippie.de> * Dropped latest make task, it is unused Signed-off-by: Thomas Boerger <thomas@webhippie.de> * Added tidb tag to drone config Signed-off-by: Thomas Boerger <thomas@webhippie.de> * Dropped the cert build tag Signed-off-by: Thomas Boerger <thomas@webhippie.de> * Dropped useless minwinsvc build tag Signed-off-by: Thomas Boerger <thomas@webhippie.de> * Dropped the useless build tags from drone config Signed-off-by: Thomas Boerger <thomas@webhippie.de>
* Move init functions from routers/install to routers/init (#230)Lunny Xiao2016-11-241-0/+82
* move init functions from routers/install to routers/init * copyright typo