Commit Graph

88 Commits

Author SHA1 Message Date
michael-sena 371f2cd469 Upgrade NLog from 4.4.11 to 4.4.13 (#4772) 2020-09-28 21:52:22 -03:00
Martin Molinero eb6e0a141c Specify log file location
- Respect "results-destination-folder", if provided, for system log
2020-05-27 14:33:44 -03:00
Martin Molinero 09c17b71ed Add assembly description to nuspec
- Due to bug in nuget failing to replace description and copyright token, setting
  .nuspec description to match assembly description
2020-05-21 14:42:12 -03:00
Martin-Molinero 1d0d4f4d7b Add assembly descriptions (#4442)
Add assembly descriptions
2020-05-21 09:35:12 -07:00
Martin Molinero 891cf4d69b Update to .Net 4.6.2 2020-05-15 17:32:46 -03:00
Martin Molinero 514c093689 EntryLog: Avoid Utc time conversion 2020-01-01 18:51:18 -03:00
Stefano Raggi e0a08cbb8d Add XML documentation generation for release builds 2019-12-14 13:50:10 +01:00
Martin Molinero 1d43dcd601 Add BaseData.AdjustResolution
- Adding `BaseData.AdjustResolution()` that should return a valid
resolution for the given data and security type.
This allows us to set a limitation which is useful to avoid invalid data
requests or unnecessary fill forward situations. The user will be
notified through a console message.
- Adding unit and regression test
- Updating example algorithms custom data resolution
- Some performance improvements. Wont change console color if
`SelectedOptimization` is defined
2019-11-04 20:38:26 -03:00
Michael Handschuh 0d4a3f3e9a Update Logging to respect CA1304 and CA1305
Updates all occurrences of parsing/ToString-ing to use CultureInfo if
possible. This project can not reference QuantConnect.Common, so it's
unable to use the new StringExtensions.

See #3045
2019-09-12 15:30:44 -04:00
Michael Handschuh c7df4e9fb3 Add StringExtensions and Parse utilizing CultureInfo.InvariantCulture
Adds static methods of the form Parse.<TypeName>(string str) that use
CultureInfo.InvariantCulture. These are to be used when parsing strings.
It's still safe (from the CA1304/CA1305 perspective) to use the ToDecimal
extension method for decimals.

Adds string extension methods for common operations that will now require
CultureInfo.InvariantCulture. These are to be used when converting values
to strings, such as ToStringInvariant()/ToStringInvariant(format), but also
useful for searching within strings, StartsWithInvariant, EndsWithInvariant
 and IndexOfInvariant.
2019-08-16 18:08:28 -03:00
Michael Handschuh 703f915182 Configure QuantConnect.ruleset in all projects
The initial ruleset is specifically aimed at addressing #3045. When we'd like
to start addressing other issues available via the FxCopAnalyzers, we can update
the action in QuantConnect.ruleset. A nice way to do it is to first set it to
warning, then go through the solution, project-by-project, fixing each warning.
At the end you can flip it to error and ensure it still builds. Moving forward,
any changes will fail if they violate the rule.

In support of #3045, we'll be configuring the following rules:
> CA1304: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1304-specify-cultureinfo?view=vs-2017
> CA1305: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305-specify-iformatprovider?view=vs-2017
2019-08-16 18:08:18 -03:00
Michael Handschuh c42057809d Add Microsoft.CodeAnalysis.FxCopAnalyzers to all projects
FxCop has various rulesets for enforcing things within our codebase.
For this particular issue, we'll be enforcing CA1304 and CA1305 to
ensure we're always using an IFormatProvider or a CultureInfo where
applicable.

Linked Issue: #3045
2019-08-16 18:08:05 -03:00
Martin Molinero f6b5e92a96 Add conditional optimization flag 2019-06-19 16:11:15 -03:00
Martin Molinero 6929b6f632 Suppressing inlining on methods that call WhoCalledMe 2018-07-27 17:36:36 -03:00
Juan José D'Ambrosio bda5b11cc2 Nuspec files added for all projects.
Launcher project is packed as `QuantConnect.Lean`but as a mean ot having all Lean features just calling one package. 

In the same sense, `QuantConnect.Algorithm.CSharp` is included as package and added as dependecy in the `QuantConnect.Lean` package just to have a working example aailable out-of-the-box.
2018-04-13 07:28:34 -03:00
Stefano Raggi 4690177836 Add milliseconds to timestamp in ConsoleLogHandler 2017-10-31 15:14:37 +01:00
Andrew e116709b24 Specify <LangVersion> of 6 in all csproj files 2017-08-07 15:27:26 -04:00
Stefano Raggi 2ef90140c9 Update "Copy to output directory" setting from Always to PreserveNewest
When building the solution, this setting (on a few files) was always triggering almost a full rebuild, even if no files changed.
2017-07-14 00:26:23 +02:00
Stefano Raggi 4f483abcd9 Upgrade libraries Accord.NET, CloneExtensions, MathNet, QLNet 2017-07-08 00:31:40 +02:00
Stefano Raggi 087a69f002 Upgrade libraries AsyncIO, Castle.Core, Moq, NetMQ, NUnit, NLog 2017-07-08 00:07:17 +02:00
Stefano Raggi e463ccf088 Upgrade all projects to target .NET Framework 4.5.2
In the advanced build settings, Language version was also upgraded from C# 5.0 to C# 6.0. The minimum Visual Studio version required will now be VS2015.
2017-07-07 22:49:17 +02:00
Anshul 41345fad51 Fixes Six warnings with code CS1570 2017-06-12 17:36:34 +05:30
Ray Bohac 1d406b8758 defaults to log.txt for logging 2017-03-20 15:48:52 -04:00
Ray Bohac e09e2a43f4 Adds NLogHandler and CompositeNLogHandler 2017-03-20 14:58:42 -04:00
Ray Bohac aa31b9b988 adds nlog.config package and its deps 2017-03-20 12:41:39 -04:00
Andrew Hart 5a633df6e9 Make xml comment file names consistent across projects
For project that have xml comment files, make the comment file end with .xml instead of .Xml or .XML.
2016-12-30 16:18:54 -05:00
Michael Handschuh b0dea07b2f Allow override of default date format
The console log handler specified a date format. I've updated the
implementation to add a constructor overload that accepts a different
date format. This can be useful when you're trying to see how precisely
timed some things are, such as testing for microsecond level accuracy
of events being fired :)
2016-10-07 04:52:01 -04:00
Michael Handschuh 9426c15e0c Use params in CompositeLogHandler ctor
The previous implementation accepts an array of log handlers which
is great, however, it lends itself to some sticky syntax.

Specifying params here makes some call sites cleaner and more
intuitive.
2016-10-07 04:44:53 -04:00
jaredbroad dd8a6442b6 Tidy unneccessary TravisCI build configuration 2016-04-19 19:51:51 -04:00
jaredbroad e93006b6a5 Added Travis CI release configuration and disabled views from building in linux 2016-04-15 12:44:37 -04:00
jaredbroad 1cff84ab81 Bux fixes on local charting, and solve logged with queue logger 2016-04-12 21:21:12 -04:00
jaredbroad 2429de3509 Remove unused references 2016-04-12 14:06:10 -04:00
jaredbroad a45183cd17 Removed unused logger 2016-04-11 20:14:27 -04:00
David Hsieh e28a3cc2a0 Merge https://github.com/QuantConnect/Lean 2016-04-07 20:53:27 +10:00
Michael Handschuh 644f255caa Add RegressionFileLogHandler
Set in confiugration using 'log-handler': 'QuantConnect.Logging.RegressionFileLogHandler'
2016-04-05 15:52:25 -04:00
Michael Handschuh 899ff7407e FileLogHandler: Add option to remove timestamp 2016-04-05 15:52:24 -04:00
David Hsieh 98eb52c33f Merged from master, not fully tested. 2016-04-04 01:14:47 +10:00
Michael Handschuh 0c0f82076e Make FileLogHandler message creation overrideable 2016-03-31 16:05:56 -04:00
David Hsieh 1bf0dff0ed Reorganised Lean Desktop to be launched from the Launcher. Moved UI Layout to mainly use VS Winforms Designer
Reorganised Lean Desktop to be launched from the Launcher.
Moved UI Layout to mainly use VS Winforms Designer.
//TODO reorganise Result Handler properly.
2016-02-21 18:14:10 +10:00
Michael Handschuh 40d47d5523 Set c# language version to 5.0 2016-01-29 17:41:20 -05:00
snugs 61ea69c62d Prevent red bleed on Log.Error 2016-01-12 20:08:08 -05:00
snugs 7881b7ab5c Redirect Log.Error to Console.Error 2016-01-11 19:21:42 -05:00
snugs 46afe179a2 Standard DEBUG:: log prefix 2016-01-04 18:04:49 -05:00
snugs be950e756a Log full errors/stack traces
Many places in the code used Log.Error(err.Message) or equivalent which
strips out all the really useful information, such as the stack trace
and inner exceptions. Using Log.Error(exception) is the correct way to
log an error as it will correctly write all the message details, also,
by passing the full Exception object we can improve the logging in this
one place and all call sites will automatically benefit from the improvements
2015-12-02 12:35:33 -05:00
snugs 7c2261f172 Removed warnings as errors for obsoletes
This is causing issues for mono users, seems to be something different
in the compilers (mono vs msft) with method resolution in ambiguos situations.
2015-11-24 18:56:21 -05:00
snugs 0ae568d980 Remove warnings as errors from Release
This is a temporary fix until we figure out why travis complains about implicits but visual studio doesn't
2015-11-23 15:45:24 -05:00
snugs 7689ae505d Update warnings as error 612 (obsolete w/ no msg) 2015-11-19 20:36:59 -05:00
snugs b6603ffd01 Set Obsolete warnings as errors 2015-11-18 13:42:40 -05:00
snugs de2ba5aa50 Prevent log writer from writing when disposed 2015-10-15 14:52:52 -04:00
QuantConnect 785e94d209 Tidy up of the ToolBox project to reduce duplicated code 2015-10-08 17:56:49 -04:00