GithubHelp home page GithubHelp logo

Comments (9)

zlzforever avatar zlzforever commented on May 12, 2024

@blafa I am working on a big re-factory:

  1. use Serilog instead of NLog, because there are a lot of extensions for Serilog like ES, Mongodb, MQ
  2. right now Env class are static and all config fields are static, i want to implement one spider use one Env, then if i changed config file will not impact the running spider.
  3. upgrade all methods to async
  4. add more test cases
    So i think i will not update nuget-package very quickly. If you want to use the next one, you can build and push it to your private NUGET server or local nuget.

from dotnetspider.

blafa avatar blafa commented on May 12, 2024

Hi. Thanks for the Info. One small input: you could maybe inject ILogger (Microsoft.Extensions.Logging: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger?view=aspnetcore-2.0) instead of hardcode Serilog dependency. Serilog provides and extension for Microsoft.Extensions.Logging (https://github.com/serilog/serilog-extensions-logging)

from dotnetspider.

zlzforever avatar zlzforever commented on May 12, 2024

Thanks, i will consider that.

from dotnetspider.

blafa avatar blafa commented on May 12, 2024

Hi. Can you estimate when your big refactoring is pushed? Have you tried to run dotnetspider in docker? :)

from dotnetspider.

zlzforever avatar zlzforever commented on May 12, 2024

Plan to push a new release this month. Didn't try it in docker, but i think it can work in docker.

from dotnetspider.

blafa avatar blafa commented on May 12, 2024

Wow cool! It works on docker except of one chromedriver issue. I will try it after the new release.
Maybe you can do the ChromeDriver path configurable if you didn't change it already ;-)

from dotnetspider.

zlzforever avatar zlzforever commented on May 12, 2024

thx for your reminder. i will have a test.

from dotnetspider.

zlzforever avatar zlzforever commented on May 12, 2024

@blafa right now, i split log module from downloader, pipeline, processor. Now you can use any log library like Nlog/ Serilog. Please see Appbase

		static AppBase()
		{
			LoggerFactory = new LoggerFactory();

			var loggerConfiguration = new LoggerConfiguration()
				.MinimumLevel.Verbose()
				.WriteTo.Console(theme: Theme)
				.WriteTo.RollingFile("dotnetspider.log");
			Log.Logger = loggerConfiguration.CreateLogger();
			LoggerFactory.AddSerilog();
		}

So if you want use NLog, then you can set the new LogFactory before run spider

Appbase.LoggerFactory = new LoggerFactory();
Appbase.LoggerFactory.AddNLog();

If any issue, please report to me. Thank you.

from dotnetspider.

blafa avatar blafa commented on May 12, 2024

@zlzforever perfect, thx!

  1. Could you make Path to ChromeDriver (Env.BaseDirectory) configurable? Could be important when running on docker. At the moment you must to put chromedriver.exe (resp. chromedriver for linux) in bin/Debug/netcoreapp2.1. Would be nicer to have this Path configurable..
  2. If possible provide options for "--no-sandbox" and "--disable-dev-shm-usage" (could also be important for docker-environment)

from dotnetspider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.