投稿時間:2023-01-17 22:22:15 RSSフィード2023-01-17 22:00 分まとめ(26件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS lambdaタグが付けられた新着投稿 - Qiita AWSで実現した不動産新着物件情報のサーバレス巡回通知システム https://qiita.com/IYT-engineer/items/e328ed04c1a8ede979a7 requests 2023-01-17 21:55:43
python Pythonタグが付けられた新着投稿 - Qiita Pythonで書くBuilderパターン https://qiita.com/Snorlax/items/33d688af6f255e5633e2 gofeffectivejavajava 2023-01-17 22:00:06
python Pythonタグが付けられた新着投稿 - Qiita AWSで実現した不動産新着物件情報のサーバレス巡回通知システム https://qiita.com/IYT-engineer/items/e328ed04c1a8ede979a7 requests 2023-01-17 21:55:43
python Pythonタグが付けられた新着投稿 - Qiita scikit-learn カリフォルニア住宅価格データの前処理に関する見解 https://qiita.com/kakiuchis/items/fb25c54af77df6e394ca scikitlearn 2023-01-17 21:55:14
python Pythonタグが付けられた新着投稿 - Qiita pymysql.err.programmingerror inf can not be used with mysql 対策 https://qiita.com/katafuchix/items/85e264e1ed94624b413e pctchange 2023-01-17 21:17:41
AWS AWSタグが付けられた新着投稿 - Qiita AWSで実現した不動産新着物件情報のサーバレス巡回通知システム https://qiita.com/IYT-engineer/items/e328ed04c1a8ede979a7 requests 2023-01-17 21:55:43
Docker dockerタグが付けられた新着投稿 - Qiita リモートGPUサーバーに立てたDocker上で、jupyter labを動かしてローカルからアクセスする方法(JAX用) https://qiita.com/kj_ini77/items/d9f43cfd8f8ded34b37a fromnvcrio 2023-01-17 21:22:58
golang Goタグが付けられた新着投稿 - Qiita go mod tidyでgitlabのリポジトリimportが失敗する https://qiita.com/bnn848/items/fda895104a6eec8f36cd fatal 2023-01-17 21:54:32
海外TECH MakeUseOf The 8 Best iPhone Apps to Help You Pass Your Driving Test https://www.makeuseof.com/best-iphone-apps-to-pass-your-driving-test/ driving 2023-01-17 12:15:15
海外TECH DEV Community NGINX Logging | Configuring Error and Access Logs, Sending Nginx Logs to Syslog & more https://dev.to/signoz/nginx-logging-configuring-error-and-access-logs-sending-nginx-logs-to-syslog-more-kmb NGINX Logging Configuring Error and Access Logs Sending Nginx Logs to Syslog amp moreThis article was originally posted on SigNoz Blog and is written by Selvaganesh NGINX is a prominent web server reverse proxy server and mail proxy utilized by many websites and applications to serve content to their users One important aspect of managing a web server is logging which refers to the process of recording information about the server s activity and performance In NGINX logging is done using the error log and access log directives error log directive specifies the file where NGINX should log errors access log directive specifies the file where NGINX should log information about incoming requests and responses What are Nginx Error Logs The error log directive is typically used to log information about errors and other important events that occur on the server This can include messages about failed requests issues with the server configuration and other issues that may require attention An example of an error log is shown in the picture below Nginx Error log example What are Nginx Access Logs The access log directive on the other hand is used to log information about incoming requests and responses This can include details such as the IP address of the client making the request the URL of the requested resource the response status code and the size of the response An example of access logs is shown in the picture below Nginx Access log exampleNGINX logs can be useful for various purposes including tracking the server s performance identifying potential issues or errors and analyzing the usage patterns of the server However managing logs can also be challenging as they can quickly grow in size and become difficult to manage In this tutorial we will illustrate the following How to configure Nginx access logsHow to configure Nginx error logsHow to send Nginx logs to SyslogCollecting and analyzing Nginx logs with SigNozLet s get started PrerequisitesDockerNginx Installing Nginx Installing NGINX on Linuxsudo apt updatesudo apt install nginxTo start NGINXservice nginx start Installing NGINX on MacYou can install NGINX on Mac using Homebrew brew install nginxTo start NGINX brew services start nginx You can then access your NGINX server on localhost Go to http localhost and you should see a screen like the one below NGINX server running on localhost Configuring NGINX to generate access logsLet s go ahead and make the necessary changes to the nginx conf file in order to change the location and structure of the logs By default NGINX logs all incoming requests to the access log file in the var log nginx directory The format of the log entries in this file is defined by the log format directive in the NGINX configuration file Let s define the custom Nginx log pattern to the nginx conf file in the directory etc nginx nginx conf as shown below log format logger json escape json source nginx message nginx log captured time time iso resp body size body bytes sent host http host address remote addr request length request length method request method uri request uri status status user agent http user agent resp time request time upstream addr upstream addr When configuring the server s access logs we provide the preferred log format logger json in a server directive Make a log format with the name and pattern shown below http sendfile on tcp nopush on tcp nodelay on keepalive timeout types hash max size log format logger json escape json source nginx message nginx log captured time time iso resp body size body bytes sent host http host address remote addr request length request length method request method uri request uri status status user agent http user agent resp time request time upstream addr upstream addr include etc nginx mime types default type application octet stream Logging Settings access log home user Work logs access log logger json A list of available variables can be found here Restart the Nginx for the config to take effect sudo service nginx restartNote The nginx config path for Mac OS will be under usr local etc nginx So please ensure to update the config properly Go to url http localhost and now look at the access log file Every line in the access log file which is in home user Work logs access log has one log record One example of a log record is shown below source nginx message nginx log captured time T resp body size host address request length method GET uri status user agent PostmanRuntime resp time upstream addr You can view the access log file through the terminal using the cat command as shown below access log file which generates Nginx logsThe next step is to send these logs to the SigNoz platform Configuring NGINX to generate error logsTo enable the error log choose the log level and log file location Using the error log directive in the nginx conf configuration file you may select the log level as shown below error log home user Work logs nginx error log emerg error log home user Work logs nginx info log info There are several levels of error logging that you can use to specify the types of errors that should be logged These log levels are debug Debug level messages are very detailed and are typically used for debugging purposes info Information level messages are used to log important events such as the start and stop of the Nginx server notice Notice level messages are used to log events that are not necessarily error conditions but are worth noting warn Warning level messages are used to log potential error conditions that may require attention error Error level messages are used to log actual error conditions that have occurred crit Critical level messages are used to log very severe error conditions that may require immediate attention alert Alert level messages are used to log conditions that require immediate action emerg Emergency level messages are used to log conditions that are so severe that the Nginx server may be unable to continue running You need to reload the nginx configuration for these changes to take effect You can do this by running the command service nginx restart Nginx error log configuration Sending NGINX logs to SyslogSyslog is a standard for logging system events It is used to record and store the log messages produced by various system components including the kernel system libraries and applications Syslog provides a centralised method for managing and storing log messages making it easier to monitor and resolve system issues To collect syslog from Nginx you will need to configure Nginx to send its log messages to syslog Add the following line to the configuration file replacing syslog server hostname with the hostname or IP address of your syslog server error log syslog server syslog server hostname facility local tag nginx severity error access log syslog server syslog server hostname facility local tag nginx severity debug Save the configuration file and restart Nginx Now Nginx will send its log messages to the syslog server which can be accessed and analyzed as needed There are several options that you can use to customize the way that Nginx sends syslog messages Here are a few examples facility This option specifies the facility to which the log message should be sent The facility is used to categorize log messages and can be used to filter log data on the syslog server Common facilities include local through local user daemon and system tag This option specifies a tag to be added to the log message The tag can be used to identify the source of the log message and can be used to filter log data on the syslog server severity This option specifies the severity level of the log message Common severity levels include emerg alert crit error warning notice info and debug Note The above configuration will send only error messages to syslog If you want to send other log levels e g info warning etc you can adjust the severity parameter in the configuration line To configure syslog on the signoz platform refer this documentation NGINX Logging and Analysis with SigNozSigNoz is a full stack open source APM that can be used for analyzing NGINX logs SigNoz provides all three telemetry signals logs metrics and traces under a single pane of glass You can easily correlate these signals to get more contextual information while debugging your application SigNoz uses a columnar database ClickHouse to store logs which is very efficient at ingesting and storing logs data Columnar databases like ClickHouse are very effective in storing log data and making it available for analysis Using SigNoz for NGINX logs can make troubleshooting easier SigNoz comes with an advanced log query builder live tail logs and the ability to filter log data across multiple fields Let us see how to collect and analyze Nginx logs with SigNoz Installing SigNozSigNoz may be installed in three simple steps on macOS or Linux PCs using a simple install script Docker Engine is installed automatically on Linux by the installation script However before running the setup script on macOS you must manually install Docker Engine git clone b main https github com SigNoz signoz gitcd signoz deploy install shYou can visit the documentation for instructions on how to install SigNoz using Docker Swarm and Helm Charts Deployment Docs Steps for collecting Nginx logs into SigNozModify the docker compose yaml file present inside deploy docker clickhouse setup to expose to mount the log file to otel collector The file is located here Mount the path where the Nginx access logs are available Work logs access log tmp access log to docker volume otel collector image signoz signoz otel collector command config etc otel collector config yaml user root required for reading docker container logs volumes otel collector config yaml etc otel collector config yaml var lib docker containers var lib docker containers ro highlight next line Work logs access log tmp access logHere we are mounting the log file of our application to the tmp directory of SigNoz otel collector You will have to replace  lt path gt with the path where your log file is present Add the filelog reciever to otel collector config yaml which is present inside deploy docker clickhouse setup and include the path tmp access log receivers filelog highlight next line include tmp access log start at beginning operators type json parser timestamp parse from attributes time layout Y m dT H M S z type move id parse body from attributes message to body type remove id time field attributes timeNext we will modify our pipeline inside otel collector config yaml to include the receiver we have created above service logs highlight next line receivers otlp filelog processors batch exporters clickhouselogsexporter Once the changes are made we need to restart the OTel Collector container to apply new changes Use the command docker compose restart Check if all the containers are running properly by using the command docker ps Check if all the containers are running properlyWe can now go to the URL http localhost and generate some Nginx logs into the access logGo to the SigNoz URL click on the Logs tab and look for the word nginx http localhost Nginx logs sent to SigNozClick on the individual log to get a detailed view Details of individual Nginx logsYou can also view the logs in JSON format Nginx logs in JSON format ConclusionNGINX logs provides useful information to debug Nginx web servers By using the error log and access log directives you can track the performance and usage of your server and identify potential issues or errors The error log directive can give you information about all errors and you can use these logs to identify exactly what went wrong The access log directive gives you information about HTTP requests received by the Nginx server and other client information like IP address response status code etc While debugging a single Nginx server by directly accessing Nginx logs can be done it s often not the case in production Managing multiple Nginx servers and troubleshooting them effectively requires a centralized log management solution In case of server downtime you need to troubleshoot issues quickly and effective dashboards around Nginx monitoring is needed With SigNoz logs you can effectively manage your Nginx logging You can check out its GitHub repo now Related PostsSigNoz A Lightweight Open Source ELK alternativeOpenTelemetry Logs A complete introduction 2023-01-17 12:39:20
海外TECH DEV Community ⚛️ Introduction to React Hooks https://dev.to/iamdevmarcos/introduction-to-react-hooks-5443 ️Introduction to React HooksWhat are Hooks Let s start by understanding what Hooks are Hooks are an innovation a modification that the React team has made available to us since version Hooks are basically a way to create components and create your application s features without creating entire classes with a lifecycle constructors defining various states binding functions and so on Now with a simple variable we can create a complete and complex component with the use of Hooks Hooks have come to change the way we code our features in order to use even less code and with more performance So if we compare a component created using Hooks with a component created with classes the one created with Hooks is infinitely smaller in terms of the amount of code and this is very beneficial both for production time and for your productivity Anyway Hooks are functions which always start with the word use that allow you to “connect to React s state and lifecycle resources from functional components and just to point out Hooks don t work inside classes Three important features about Hooks They only work on functional components They must always be invoked in the main scope of your component for example outside ifs and functions And finally they cannot be linked to any conditional to be executed React provides some built in Hooks like useState we ll see in the next post but you can also create your own custom Hooks to reuse state behavior between different components Hope this article helped you to understand more about React Hooks 2023-01-17 12:30:23
海外TECH DEV Community Build an Effective Junior Developer Portfolio That Will Get You Hired 👨‍💻🔥 https://dev.to/rammcodes/build-an-effective-junior-developer-portfolio-that-will-get-you-hired-4m8c Build an Effective Junior Developer Portfolio That Will Get You Hired ‍How to build an Effective Junior Developer Portfolio That Will Get You Hired In ‍Some important points that you can follow while building your Developer Portfolio ️⃣Showcase your best work Include only your most impressive and relevant projects in your portfolio Use screenshots and explain the technologies and techniques used ️⃣Make it easy to navigate Organize your portfolio in a logical and easy to use manner Make sure it s clear what each project is about and how to view it ️⃣Include a brief bio and contact information Give potential employers or clients an idea of who you are what you can do and how to contact you ️⃣Use a clean and modern design Keep the design of your portfolio simple and clean using a modern design aesthetic This will help your work stand out and make a good impression ️⃣Keep it up to date Make sure to keep your portfolio up to date with your latest work and skills This will help demonstrate your growth as a developer and your ability to stay current with industry trends ️⃣Optimize for mobile and web Your portfolio should be optimized for different devices and web browsers so that it looks good and works well on any device Hope this will help you to build an effective portfolio to make yourself stand out from the crowd and land your dream opportunity Do Like ️ amp Save 𝗙𝗼𝗹𝗹𝗼𝘄me on Linkedin for more Tips Guides Resources related to programming and Web Development ‍Feel free to connect with me 2023-01-17 12:22:40
海外TECH DEV Community Building a Multi-Language Website with React and i18next https://dev.to/abhaysinghr1/building-a-multi-language-website-with-react-and-i18next-4g66 Building a Multi Language Website with React and inextBuilding a website that supports multiple languages can be a challenging task but with the right tools it can also be a lot of fun In this blog post we will explore how to build a multi language website with React and inext a popular internationalization in library First let s start by understanding what inext is and what it can do inext is an open source library that provides a set of tools for internationalizing your website or application It makes it easy to add support for multiple languages by providing a simple and flexible API for handling translations formatting dates and numbers and more The first step in building a multi language website with React and inext is to install the library You can do this by running the following command in your terminal npm install inextOnce inext is installed you can start configuring it to work with your React application One of the most important things to do is to set up the inext instance which is the main object that you will use to interact with the library You can do this by creating a new file called in js and adding the following code import inext from inext import initReactInext from react inext inext use initReactInext init lng en fallbackLng en resources en translation key Hello world fr translation key Bonjour le monde export default inext In this code we re importing inext and the initReactInext function from the react inext package Then we re initializing the inext instance by calling the init method and passing in some configuration options The most important option is the resources option which is where you define your translations In this example we re defining translations for the en and fr languages Now that we have set up the inext instance we can start using it in our React components The easiest way to do this is to use the useTranslation hook which is provided by the react inext package You can use this hook in any component that needs to display translated text For example the following component uses the useTranslation hook to display a translated text import useTranslation from react inext function MyComponent const t useTranslation return lt h gt t key lt h gt In this example the useTranslation hook returns an object with a t property which is a function that can be used to get translations The t function takes a single argument which is the key of the translation that you want to get In this case we re passing in the key key which corresponds to the translation Hello world in English and Bonjour le monde in French Another way to use translations in your React components is to use the Trans component provided by the react inext package The Trans component can be used to wrap any text that needs to be translated and it automatically detects the current language and provides the correct translation For example the following component uses the Trans component to display a translated text import Trans from react inext function MyComponent return lt h gt lt Trans gt key lt Trans gt lt h gt You can also pass the translation key as a prop to the Trans component which makes it more reusable import Trans from react inext function MyComponent key return lt h gt lt Trans gt key lt Trans gt lt h gt Another important aspect of building a multi language website is to provide a way for users to switch between languages inext provides a changeLanguage method that can be used to change the current language For example the following component uses the changeLanguage method to allow the user to switch between English and French import useTranslation from react inext function LanguageSwitcher const in useTranslation return lt gt lt button onClick gt in changeLanguage en gt English lt button gt lt button onClick gt in changeLanguage fr gt French lt button gt lt gt In this example we re using the useTranslation hook to get the in object and then using the changeLanguage method to change the current language when the user clicks on one of the buttons In conclusion building a multi language website with React and inext is a great way to provide a better user experience for your international audience With inext you can easily add support for multiple languages manage translations and switch between languages With the useTranslation hook or the Trans component you can easily use the translations in your React components Remember that building a multi language website is a process that takes time and effort but it s worth it to provide a better user experience and reach a broader audience 2023-01-17 12:17:54
Apple AppleInsider - Frontpage News Yale Smart Safe review: HomeKit support, but buggy https://appleinsider.com/articles/23/01/17/yale-smart-safe-review-homekit-support-but-buggy?utm_medium=rss Yale Smart Safe review HomeKit support but buggyThe new Yale Smart Safe has good HomeKit compatibility and a ton of great features ーbut software bugs are an issue right now The new Yale Smart SafeYale announced the new Smart Safe following CES though it got previewed a few years ago Now long overdue we ve gotten to test the safe out over the past few weeks Read more 2023-01-17 12:33:49
Apple AppleInsider - Frontpage News How to use AI subject selection in Photos in iOS 16 & macOS Ventura https://appleinsider.com/inside/ios-16/tips/how-to-use-ai-subject-selection-in-photos-in-ios-16-macos-ventura?utm_medium=rss How to use AI subject selection in Photos in iOS amp macOS VenturaApple added a few new AI based selection tools to Photos in iOS and Preview in macOS Ventura Here s how to use them Apple s Photos app on iOS has a few new image selection and copy features You can use these features to make selected portions of your photos available to others or to copy them to other applications Copy and share Read more 2023-01-17 12:19:32
Apple AppleInsider - Frontpage News Foxconn replaces iPhone business chief in wake of factory issues https://appleinsider.com/articles/23/01/17/foxconn-replaces-iphone-business-chief-in-wake-of-factory-issues?utm_medium=rss Foxconn replaces iPhone business chief in wake of factory issuesApple assembly partner Foxconn has installed a new chief of its iPhone business with a change in leadership arriving after months of troubled iPhone Pro production A Foxconn facilityThe new boss of Foxconn s iPhone assembly work is Michael Chiang an appointment that was announced during the company s end of year party on Sunday Read more 2023-01-17 12:13:38
海外TECH Engadget The Morning After: Wyoming wants to phase out new EV sales by 2035 https://www.engadget.com/the-morning-after-wyoming-wants-to-phase-out-new-ev-sales-by-2035-121530042.html?src=rss The Morning After Wyoming wants to phase out new EV sales by While other US states and the rest of the world inch towards goals of banning gasoline powered cars Wyoming is going in the opposite direction The state s legislature is considering a resolution that calls for a phase out of new electric vehicle sales by Introduced on Friday Senate Joint Resolution has support from members of the state s House of Representatives and Senate The resolution says the state would need to build “massive amounts of new power generation to “sustain the misadventure of electric vehicles Its goal is to phase out the sales of EVs entirely by Yes EVs In the proposal a group of lawmakers led by Senator Jim Anderson says Wyoming s “proud and valued oil and gas industry has created “countless jobs and contributed revenue to the state They add that a lack of charging infrastructure in Wyoming would make the widespread use of EVs “impracticable The legislation may partially be a political stunt but Wyoming produced million barrels of oil in it s a crucial part of the state s economy But Wyoming s Carbon County also has one of the largest wind farms in the US Mat SmithThe Morning After isn t just a newsletter it s also a daily podcast Get our daily audio briefings Monday through Friday by subscribing right here The biggest stories you might have missedThe tech industry still has a long way to go when it comes to accessibility Microsoft will add ChatGPT to its cloud based Azure OpenAI service soon How to share your location using an iPhoneHBO s The Last of Us successfully trades hordes of monsters for emotional depthThe Ayaneo Air Pro is a step forward for handheld PCsApple may unveil new and inch MacBook Pros later todayThey could be the first Macs with WiFi E Multiple sources suggest Apple is prepping new MacBook Pro models for launch very soon Bloomberg s Mark Gurman teased last fall that these systems would share the same design as the M variants released in late They would center around new M Pro and M Max chips that would feature up to CPU cores and GPU cores in the Max Don t expect a touchscreen or other major revisions At least not yet They might be the first Macs to include WiFi E though Continue reading Your Stadia controller won t just be a paperweight after the service shuts downGoogle s game streaming service shutters tomorrow Google has confirmed it will release a tool to enable Bluetooth support on the Stadia controller You ll have to wait until next week to download it but this should make the device useful for just about any title with gamepad support Stadia as we know it is about to end but Google s Immersive Stream for Games should ensure the cloud functionality lives on for other companies offering game streams The team behind Stadia has also released a Snake clone Worm Game as a final gift to users Continue reading High powered lasers used to steer lightning strikesThe technology could protect rocket launchpads and power plants University of GenevaLightning rods your time is up European researchers have successfully tested a system that uses terawatt level laser pulses to steer lightning toward a foot rod It s not limited by its height and can cover much wider areas in this case feet while penetrating clouds and fog The laser ionizes nitrogen and oxygen molecules releasing electrons and creating a plasma that conducts electricity As the laser fires at a very quick pulses per second it s more likely to intercept lightning as it forms Continue reading 2023-01-17 12:15:30
ニュース @日本経済新聞 電子版 国家公務員の海外出張、40年ぶり宿泊費増額を検討 https://t.co/ZSAR0yiYlL https://twitter.com/nikkei/statuses/1615318450918027264 国家公務員 2023-01-17 12:01:44
ニュース BBC News - Home A39 Somerset: Double-decker bus carrying 70 people overturns https://www.bbc.co.uk/news/uk-england-somerset-64301329?at_medium=RSS&at_campaign=KARANGA conditions 2023-01-17 12:46:48
ニュース BBC News - Home David Carrick: Metropolitan Police sack serial rapist police officer https://www.bbc.co.uk/news/uk-england-beds-bucks-herts-64302608?at_medium=RSS&at_campaign=KARANGA offences 2023-01-17 12:01:27
ニュース BBC News - Home Ken Bruce to leave BBC Radio 2 show after 31 years and join Greatest Hits https://www.bbc.co.uk/news/entertainment-arts-64305756?at_medium=RSS&at_campaign=KARANGA greatest 2023-01-17 12:44:22
ニュース BBC News - Home Train drivers to go on strike in February https://www.bbc.co.uk/news/business-64303591?at_medium=RSS&at_campaign=KARANGA calls 2023-01-17 12:31:08
ニュース BBC News - Home Pay rises at fastest pace for over 20 years, but below inflation https://www.bbc.co.uk/news/business-64290162?at_medium=RSS&at_campaign=KARANGA pay 2023-01-17 12:01:42
ニュース BBC News - Home Britishvolt: UK battery giant collapses into administration https://www.bbc.co.uk/news/business-64303149?at_medium=RSS&at_campaign=KARANGA attempts 2023-01-17 12:47:02
ニュース BBC News - Home Six Nations 2023: Ken Owens to captain Wales squad that includes four uncapped players https://www.bbc.co.uk/sport/rugby-union/64301116?at_medium=RSS&at_campaign=KARANGA justin 2023-01-17 12:25:47
ニュース Newsweek 熱湯の食事を「2分で食え」、缶詰のような収容所...ウクライナ人捕虜、飢餓・拷問・洗脳の実態 https://www.newsweekjapan.jp/stories/world/2023/01/post-100601.php そこで本誌は、捕虜となったウクライナ兵の親族人と、昨年月に捕虜交換で解放された兵士人に話を聞いた。 2023-01-17 21:35:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)