Store not working properly after modification refresh Opencart v3 - opencart

Store was working fine. I was creating a module and had to refresh. I went to admin > modification and click on trash and refresh button. after that my store messed up and now its not working. Admin panel is working perfectly fine. I tried to clear cache and refresh again but nothing is working. I kept caching disabled for development reasons.
i'm using opencart version 3 and this theme ThemeDemo. This is how it looks after hitting refresh button
this is how it looks
2018-02-10 6:34:18 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:38:08 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:39:00 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:39:59 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:39:59 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:46:29 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------
2018-02-10 6:46:52 - MOD: Modification Default
FILE: system/engine/action.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 69
FILE: system/engine/loader.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 77
LINE: 151
LINE: 168
FILE: system/library/config.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 59
FILE: system/library/language.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 67
LINE: 73
FILE: system/library/template/template.php
REGEX: ~(require|include)(_once)?\(([^)]+)~
LINE: 18
FILE: system/library/template/twig.php
CODE: $loader = new \Twig_Loader_Filesystem(DIR_TEMPLATE);
LINE: 19
----------------------------------------------------------------
MOD: Bug Fixing OC-3.x
----------------------------------------------------------------
MOD: OCMod Editor
FILE: admin/controller/marketplace/modification.php
CODE: $data['refresh'] = $this->url->link('marketplace/modification/refresh', 'user_token=' . $this->session->data['user_token'] . $url, true);
LINE: 657
CODE: $data['modifications'][] = array(
LINE: 679
CODE: $data['tab_log'] = $this->language->get('tab_log');
NOT FOUND - OPERATIONS ABORTED!
FILE: admin/view/template/marketplace/modification.twig
CODE: <div class="pull-right">
LINE: 5
CODE: {% if not modification.enabled %}
LINE: 96
----------------------------------------------------------------
MOD: Simple Blog
FILE: admin/controller/common/column_left.php
CODE: $report = array();
LINE: 728
FILE: admin/language/ar-ar/common/column_left.php
CODE: $_['text_other_status']
LINE: 104
FILE: admin/language/en-gb/common/column_left.php
CODE: $_['text_other_status']
LINE: 102
----------------------------------------------------------------
MOD: So Mobile - Opencart 3.x
----------------------------------------------------------------
MOD: So OnePage Checkout
----------------------------------------------------------------
MOD: So Social Login
----------------------------------------------------------------
MOD: So ThemeConfig
FILE: system/engine/router.php
CODE: while ($action instanceof Action)
LINE: 59
FILE: admin/controller/design/layout.php
CODE: public function index()
LINE: 5
CODE: design/layout_form
LINE: 403
CODE: design/layout_form
LINE: 403
CODE: $design = array();
LINE: 352
----------------------------------------------------------------
MOD: So Tools
----------------------------------------------------------------

Related

How to convert escape codes to html or remove

Kestrel in ASP.NET 5 Core MVC application in Debian writes escape codes to /var/log/syslog text file like
Apr 5 22:02:21 ew kestrel-store[31907]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Microsoft.Hosting.Lifetime[0]
Apr 5 22:02:21 ew kestrel-store[31907]: Now listening on: http://localhost:5000
Apr 5 22:02:21 ew kestrel-store[31907]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Microsoft.Hosting.Lifetime[0]
Apr 5 22:02:21 ew kestrel-store[31907]: Application started. Press Ctrl+C to shut down.
Apr 5 22:02:21 ew kestrel-store[31907]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Microsoft.Hosting.Lifetime[0]
Apr 5 22:02:21 ew kestrel-store[31907]: Hosting environment: Production
Apr 5 22:02:21 ew kestrel-store[31907]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: Microsoft.Hosting.Lifetime[0]
Apr 5 22:02:21 ew kestrel-store[31907]: Content root path: /var/www/store5
This file is read by MVC controller and sent to user in view.
How to convert this file to html (for example, using colored or italic lines) or remove escape codes from file so that file is easier to read ?
Or how to force kestrel output plain text without escape codes ?
Controller code:
public IActionResult Syslog()
{
return new ContentResult()
{
Content = FileToStr("/var/log/syslog")
};
}
static string FileToStr(string cFileName)
{
StreamReader oReader = File.OpenText(cFileName);
string lcString = oReader.ReadToEnd();
oReader.Close();
return lcString;
}
Escape sequence is defined as:
One \x1b
One [
Zero or more parameter bytes 0x30-0x3f
Zero or more intermediate bytes 0x20-0x2f
One final byte 0x40-0x7f
Update
Code in answer adds span to start of every line and does not remove escape sequences:
<span style="color: blue">Apr 8 00:00:05 ew rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="573" x-info="https://www.rsyslog.com"] rsyslogd was HUPed</span>
<span style="color: blue">Apr 8 00:00:05 ew systemd[1]: logrotate.service: Succeeded.</span>
<span style="color: blue">Apr 8 00:00:05 ew systemd[1]: Started Rotate log files.</span>
<span style="color: blue">Apr 8 00:00:10 ew colord[1172]: failed to get session [pid 23699]: No data available</span>
<span style="color: blue">Apr 8 00:00:12 ew colord[1172]: failed to get session [pid 23699]: No data available</span>
<span style="color: blue">Apr 8 00:00:14 ew colord[1172]: failed to get session [pid 23699]: No data available</span>
<span style="color: blue">Apr 8 00:05:01 ew CRON[23838]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)</span>
<span style="color: blue">Apr 8 00:15:01 ew CRON[24082]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)</span>
<span style="color: blue">Apr 8 00:17:01 ew CRON[24128]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)</span>
<span style="color: blue">Apr 8 00:21:49 ew kestrel-store[22413]: #033[40m#033[32minfo#033[39m#033[22m#033[49m: WebOptimizer.AssetMiddleware[1000]</span>
<span style="color: blue">Apr 8 00:21:49 ew kestrel-store[22413]: Request started for '/c/version.js'</span>
<span style="color: blue">Apr 8 00:21:49 ew kestrel-store[22413]: #033[41m#033[30mfail#033[39m#033[22m#033[49m: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]</span>
<span style="color: blue">Apr 8 00:21:49 ew kestrel-store[22413]: An unhandled exception has occurred while executing the request.</span>
Expected output is:
Hope this is helpful. I used rextester.com write a formatted code. But tests with files doesn't work there.
Please correct this post if necessary. Also its not the shortest version, but I think its most clear.
//Rextester.Program.Main is the entry point for your code. Don't change it.
//Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354)
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
using (var reader = new StreamReader(#"c:\your_input_file.txt"))
using (var writer = new StreamWriter(#"c:\your_output_file.html"))
{
WriteHtmlHeader(writer);
string line;
while((line = reader.ReadLine()) != null)
{
line = AddSpan(line);
}
WriteHtmlFooter(writer);
}
}
private static void WriteHtmlHeader(StreamWriter outfile)
{
// writing all the header and the start of body...
// you can take it from another file
}
private static void WriteHtmlFooter(StreamWriter outfile)
{
// writing the footer of your html file
}
private static string AddSpan(string line)
{
if (Regex.IsMatch(line, "\x1b"))
{
return AddStyledSpan(line, "color: green");
}
else if (Regex.IsMatch(line, "\["))
{
return AddStyledSpan(line, "color: blue");
}
// ...
else
{
// Mark this span as error or standard
return AddStyledSpan(line, "color: red");
}
}
private static string AddStyledSpan(string line, string style)
{
return "<span style=\"" + style + "\">" + line + "</span>";
}
}
}
Hope this helps. Also look at
regex101 - online regex tester
and
debuggex - regex visualization.
(But use it carefully, regular expressions works somtimes different).

return only lines not containing certain word

I'm having this piece of text
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/Documents/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading page WebParts...
2/27/2020 7:00:44 PM 138 (6036) Downloading page web parts completed. 1 web parts successfully downloaded.
2/27/2020 7:00:44 PM 138 (6036) Downloading page content...
2/27/2020 7:00:44 PM 138 (6036) Restarting from position 8312...
2/27/2020 7:00:44 PM 138 (6036) Error: error
double double
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/sdadasda/Forms/All.aspx...
2/27/2020 7:00:44 PM 138 (6036) Error: Unspecified error
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/21312332131/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/123/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/123/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/Documeents/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/wr/Forms/All.aspx...
I need to return all lines with:
"Downloading view page:" part in them
no "Documents" word in them.
Expected result:
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/21312332131/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/123/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/123/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/Documeents/Forms/All.aspx...
2/27/2020 7:00:43 PM 138 (6036) Downloading view page: /personal/test/wr/Forms/All.aspx...
I tried negative lookahead and regular [^Docuemnts]. None seems to work.
(\(\d+\)).*Downloading view page:\s\/personal\/\S+\/[^(Documents)]\/F
(\(\d+\)).*Downloading view page:\s\/personal\/\S+\/(?!Documents)\/F
One easy solution would be to just use a single negative lookahead to exclude Documents:
^(?!.*\bDocuments\b).*\bDownloading view page:(?!\S).*$
Demo
Here is a full explanation of the regex pattern:
^ from the start of the string
(?!.*\bDocuments\b) assert that "Documents" does not occur anywhere in the line
.*\bDownloading view page: then match "Downloading view page:"
(?!\S) assert that what follows is either whitespace or end of string
.* match the rest of the line
$ until the end of the string

NativeScript AWS AppSync Integration

I've followed several AppSync tutorials for angular web, but trying to repeat the process in NativeScript has been more difficult. It looks like people have done it before so any input from anyone who has gotten this to work would be awesome.
Following the same general procedure I did for a regular angular angular app, I attempted to use aws-appsync and nativescript-nodeify to attempt to make it nativescript-compatible. Adding nativescript-nodeify got rid of my initial error, but now I'm getting a new error:
The error I'm getting is:
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x100b9373c NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2 0x100bc4068 -[TNSRuntime executeModule:referredBy:]
3 0x10056229c
4 0x184fcdfc0 <redacted>
JavaScript stack trace:
1 moduleDeclarationInstantiation#file:///app/tns_modules/aws-appsync/lib/link/non-terminating-link.js:71:26
2 link#[native code]
3 #[native code]
4 promiseReactionJob#[native code]
5 require#[native code]
6 anonymous#file:///app/tns_modules/aws-appsync/lib/link/non-terminating-link.js:71:26
7 evaluate#[native code]
8 moduleEvaluation#[native code]
9 #[native code]
10 promiseReactionJob#[native code]
11 require#[native code]
12 anonymous#file:///app/tns_modules/aws-appsync/lib/link/non-terminating-http-link.js:25:37
13 evaluate#[native code]
14 moduleEvaluation#[native code]
15 #[native code]
16 promiseReactionJob#[native code]
17 require#[native code]
18 anonymous#file:///app/tns_modules/aws-appsync/lib/link/index.js:21:42
19 evaluate#[native code]
20 moduleEvaluation#[native code]
21 #[native code]
22 promiseReactionJob#[native code]
23 require#[native code]
24 anonymous#file:///app/tns_modules/aws-appsync/lib/client.js:87:21
25 evaluate#[native code]
26 moduleEval<\M-b\M^#\M-&>
JavaScript error:
file:///app/tns_modules/aws-appsync/lib/link/non-terminating-link.js:71:26: JS ERROR SyntaxError: Importing binding name 'print' is not found.
I'm getting an error when initializing AWSAppSyncConfig. The relevant code is below:
require('nativescript-nodeify');
const appSyncConfig = ...
import AWSAppSyncClient from 'aws-appsync';
import { AUTH_TYPE } from 'aws-appsync/lib/link/auth-link';
...
const client = new AWSAppSyncClient({
url: appSyncConfig.aws_appsync_graphqlEndpoint,
region: appSyncConfig.aws_appsync_region,
auth: {
type: AUTH_TYPE.AMAZON_COGNITO_USER_POOLS,
jwtToken: ACCESS_TOKEN
}
});
The error message points to this line in non-terminating-link.js:
var linkUtils_1 = require("apollo-link/lib/linkUtils");
The problem ended up being related to a problem with compatibility between typescript 2.9.* and aws-appsync 1.3.4. I updated my typescript to 3.0.3 and it's working now

Msys Mingw64 C++ Segmentation fault with Mysql Connector mysqlcppconn

I'm running msys2 mingw64 bit (installed from msys2-x86_64-20161025.exe) and trying to compile and run some C++ code which will connect to a local mysql instance. I have managed to compile but get a segfault on run. Details below: What have I missed?
./test.exe
Segmentation fault
My code:
#include <stdlib.h>
#include <iostream>
#include <mysql_connection.h>
#include <driver.h>
#include <exception.h>
#include <resultset.h>
#include <statement.h>
using namespace sql;
int main(void){
sql::Driver *driver;
sql::Connection *con;
driver = get_driver_instance();
con = driver->connect("tcp://127.0.0.1:3306","root","coolpasswd");
return 0;
}
Compile
g++ -Wall -I /c/Program\ Files/MySQL/Connector\ C++\ 1.1/include/ -I /c/Program\ Files/MySQL/Connector\ C++\ 1.1/include/cppconn -I /c/msys64/mingw32/include/ -L /c/Program\ Files/MySQL/Connector\ C++\ 1.1/lib/opt -o test test.cpp -lmysqlcppconn --verbose
My Path
export PATH=/c/Program\ Files/MySQL/Connector\ C++\ 1.1/lib/opt:$PATH
strace test.exe
[SNIP]
create_child: test.exe
45 12365 [main] test 21024 posify_maybe: env var converted to PATH=/c/Program Files/MySQL/Connector C++ 1.1/lib/opt:/c/php-7.0.27-Win32-VC14-x64:/mingw64/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
108 12473 [main] test 21024 win32env_to_cygenv: 0x600039170: PATH=/c/Program Files/MySQL/Connector C++ 1.1/lib/opt:/c/php-7.0.27-Win32-VC14-x64:/mingw64/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
78 12551 [main] test 21024 win32env_to_cygenv: 0x600028D30: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
75 12626 [main] test 21024 win32env_to_cygenv: 0x600028D80: PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
75 12701 [main] test 21024 win32env_to_cygenv: 0x600028DD0: PRINTER=Adobe PDF
72 12773 [main] test 21024 win32env_to_cygenv: 0x600028DF0: PROCESSOR_ARCHITECTURE=AMD64
72 12845 [main] test 21024 win32env_to_cygenv: 0x600028E20: PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 45 Stepping 6, GenuineIntel
74 12919 [main] test 21024 win32env_to_cygenv: 0x600028E70: PROCESSOR_LEVEL=6
71 12990 [main] test 21024 win32env_to_cygenv: 0x600028E90: PROCESSOR_REVISION=2d06
72 13062 [main] test 21024 win32env_to_cygenv: 0x6000392B0: PROGRAMFILES=C:\Program Files
71 13133 [main] test 21024 win32env_to_cygenv: 0x6000392E0: PROMPT=$P$G
76 13209 [main] test 21024 win32env_to_cygenv: 0x600039300: PS1=\[\e]0;\w\a\]\n\[\e[32m\]\u#\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n\$
73 13282 [main] test 21024 win32env_to_cygenv: 0x600039370: PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
75 13357 [main] test 21024 win32env_to_cygenv: 0x6000393F0: PUBLIC=C:\Users\Public
72 13429 [main] test 21024 win32env_to_cygenv: 0x600039410: PWD=/c/Users/tomk/Documents/of_v0.9.8_msys2_release/examples/video/videoPlayerTomek
71 13500 [main] test 21024 win32env_to_cygenv: 0x600039470: ProgramData=C:\ProgramData
72 13572 [main] test 21024 win32env_to_cygenv: 0x6000394A0: ProgramFiles(x86)=C:\Program Files (x86)
73 13645 [main] test 21024 win32env_to_cygenv: 0x6000394E0: ProgramW6432=C:\Program Files
82 13727 [main] test 21024 win32env_to_cygenv: 0x600039510: SESSIONNAME=Console
72 13799 [main] test 21024 win32env_to_cygenv: 0x600039530: SHELL=/usr/bin/bash
70 13869 [main] test 21024 win32env_to_cygenv: 0x600039550: SHLVL=1
70 13939 [main] test 21024 win32env_to_cygenv: 0x600039570: SYSTEMDRIVE=C:
72 14011 [main] test 21024 win32env_to_cygenv: 0x600039590: SYSTEMROOT=C:\WINDOWS
71 14082 [main] test 21024 getwinenv: can't set native for TEMP= since no environ yet
39 14121 [main] test 21024 mount_info::conv_to_posix_path: conv_to_posix_path (C:\msys64\tmp, 0x10000000, no-add-slash)
45 14166 [main] test 21024 normalize_win32_path: C:\msys64\tmp = normalize_win32_path (C:\msys64\tmp)
40 14206 [main] test 21024 mount_info::conv_to_posix_path: mount[0] .. checking / -> C:\msys64
40 14246 [main] test 21024 mount_info::conv_to_posix_path: /tmp = conv_to_posix_path (C:\msys64\tmp)
102 14348 [main] test 21024 win_env::add_cache: posix /tmp
40 14388 [main] test 21024 win_env::add_cache: native TEMP=C:\msys64\tmp
41 14429 [main] test 21024 posify_maybe: env var converted to TEMP=/tmp
102 14531 [main] test 21024 win32env_to_cygenv: 0x600039610: TEMP=/tmp
74 14605 [main] test 21024 win32env_to_cygenv: 0x6000395B0: TERM=xterm
71 14676 [main] test 21024 getwinenv: can't set native for TMP= since no environ yet
40 14716 [main] test 21024 mount_info::conv_to_posix_path: conv_to_posix_path (C:\msys64\tmp, 0x10000000, no-add-slash)
42 14758 [main] test 21024 normalize_win32_path: C:\msys64\tmp = normalize_win32_path (C:\msys64\tmp)
40 14798 [main] test 21024 mount_info::conv_to_posix_path: mount[0] .. checking / -> C:\msys64
41 14839 [main] test 21024 mount_info::conv_to_posix_path: /tmp = conv_to_posix_path (C:\msys64\tmp)
101 14940 [main] test 21024 win_env::add_cache: posix /tmp
39 14979 [main] test 21024 win_env::add_cache: native TMP=C:\msys64\tmp
41 15020 [main] test 21024 posify_maybe: env var converted to TMP=/tmp
102 15122 [main] test 21024 win32env_to_cygenv: 0x600039690: TMP=/tmp
71 15193 [main] test 21024 win32env_to_cygenv: 0x600039630: TZ=Europe/London
71 15264 [main] test 21024 win32env_to_cygenv: 0x6000396B0: USER=tomk
70 15334 [main] test 21024 win32env_to_cygenv: 0x6000396D0: USERDOMAIN=DESKTOP-HBTHS30
71 15405 [main] test 21024 win32env_to_cygenv: 0x600039700: USERDOMAIN_ROAMINGPROFILE=DESKTOP-HBTHS30
74 15479 [main] test 21024 win32env_to_cygenv: 0x600039740: USERNAME=tomk
70 15549 [main] test 21024 win32env_to_cygenv: 0x600039760: USERPROFILE=C:\Users\tomk
71 15620 [main] test 21024 win32env_to_cygenv: 0x600039790: WD=C:\msys64\usr\bin\
75 15695 [main] test 21024 win32env_to_cygenv: 0x6000397B0: WINDIR=C:\WINDOWS
70 15765 [main] test 21024 win32env_to_cygenv: 0x6000397D0: _=/usr/bin/strace
71 15836 [main] test 21024 getwinenv: can't set native for TEMP= since no environ yet
39 15875 [main] test 21024 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Users\tomk\AppData\Local\Temp, 0x10000000, no-add-slash)
41 15916 [main] test 21024 normalize_win32_path: C:\Users\tomk\AppData\Local\Temp = normalize_win32_path (C:\Users\tomk\AppData\Local\Temp)
40 15956 [main] test 21024 mount_info::conv_to_posix_path: mount[0] .. checking / -> C:\msys64
41 15997 [main] test 21024 mount_info::conv_to_posix_path: mount[1] .. checking /bin -> C:\msys64\usr\bin
41 16038 [main] test 21024 mount_info::conv_to_posix_path: /c/Users/tomk/AppData/Local/Temp = conv_to_posix_path (C:\Users\tomk\AppData\Local\Temp)
105 16143 [main] test 21024 win_env::add_cache: posix /c/Users/tomk/AppData/Local/Temp
39 16182 [main] test 21024 win_env::add_cache: native TEMP=C:\Users\tomk\AppData\Local\Temp
40 16222 [main] test 21024 posify_maybe: env var converted to TEMP=/c/Users/tomk/AppData/Local/Temp
104 16326 [main] test 21024 win32env_to_cygenv: 0x6000395D0: TEMP=/c/Users/tomk/AppData/Local/Temp
73 16399 [main] test 21024 getwinenv: can't set native for TMP= since no environ yet
38 16437 [main] test 21024 mount_info::conv_to_posix_path: conv_to_posix_path (C:\Users\tomk\AppData\Local\Temp, 0x10000000, no-add-slash)
40 16477 [main] test 21024 normalize_win32_path: C:\Users\tomk\AppData\Local\Temp = normalize_win32_path (C:\Users\tomk\AppData\Local\Temp)
41 16518 [main] test 21024 mount_info::conv_to_posix_path: mount[0] .. checking / -> C:\msys64
42 16560 [main] test 21024 mount_info::conv_to_posix_path: mount[1] .. checking /bin -> C:\msys64\usr\bin
41 16601 [main] test 21024 mount_info::conv_to_posix_path: /c/Users/tomk/AppData/Local/Temp = conv_to_posix_path (C:\Users\tomk\AppData\Local\Temp)
108 16709 [main] test 21024 win_env::add_cache: posix /c/Users/tomk/AppData/Local/Temp
40 16749 [main] test 21024 win_env::add_cache: native TMP=C:\Users\tomk\AppData\Local\Temp
39 16788 [main] test 21024 posify_maybe: env var converted to TMP=/c/Users/tomk/AppData/Local/Temp
104 16892 [main] test 21024 win32env_to_cygenv: 0x600039650: TMP=/c/Users/tomk/AppData/Local/Temp
46 16938 [main] test 21024 pinfo_init: Set nice to 0
40 16978 [main] test 21024 pinfo_init: pid 21024, pgid 21024, process_state 0x41
40 17018 [main] test 21024 App version: 2009.0, api: 0.318
41 17059 [main] test 21024 DLL version: 2010.0, api: 0.325
40 17099 [main] test 21024 DLL build: 2018-02-09 15:25
55 17154 [main] test 21024 dtable::extend: size 32, fds 0x180306130
130 17284 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
410 17694 [main] test 21024 transport_layer_pipes::connect: Try to connect to named pipe: \\.\pipe\msys-dd50a72ab4668b33-lpc
68 17762 [main] test 21024 transport_layer_pipes::connect: Error opening the pipe (2)
74 17836 [main] test 21024 client_request::make_request: cygserver un-available
1009 18845 [main] test 21024 reg_key::build_reg: failed to create key ServicesForNFS in the registry
--- Process 21024 loaded C:\Windows\System32\netapi32.dll at 00007ff940e40000
--- Process 21024 loaded C:\Windows\System32\samcli.dll at 00007ff93f600000
--- Process 21024 loaded C:\Windows\System32\ucrtbase.dll at 00007ff9470f0000
--- Process 21024 loaded C:\Windows\System32\samlib.dll at 00007ff93cc30000
--- Process 21024 loaded C:\Windows\System32\netutils.dll at 00007ff946760000
4345 23190 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
810 24000 [main] test 21024 pwdgrp::fetch_account_from_windows: NetLocalGroupGetInfo(None) 1376
54 24054 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
751 24805 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
50 24855 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
42 24897 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
43 24940 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
44 24984 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
42 25026 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
43 25069 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
43 25112 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
42 25154 [main] test 21024 pwdgrp::fetch_account_from_windows: line:
46 25200 [main] test 21024 cygheap_user::ontherange: what 2, pw 0x180306480
41 25241 [main] test 21024 cygheap_user::ontherange: HOME is already in the environment /home/tomk
86 25327 [main] test 21024 build_argv: cmd = 'test.exe', winshell = 1, glob = 1
140 25467 [main] test 21024 build_argv: argv[0] = 'test.exe'
74 25541 [main] test 21024 build_argv: argc 1
213 25754 [main] test 21024 build_fh_pc: created an archetype (0x1803077A0) for /dev/pty4(136/4)
75 25829 [main] test 21024 build_fh_pc: fh 0x180307430, dev 00880004
83 25912 [main] test 21024 fhandler_pipe::create: name \\.\pipe\msys-dd50a72ab4668b33-pty4-from-master, size 131072, mode PIPE_TYPE_MESSAGE
82 25994 [main] test 21024 fhandler_pipe::create: pipe busy
48 26042 [main] test 21024 tty::exists: exists 1
184 26226 [main] test 21024 set_posix_access: ACL-Size: 124
93 26319 [main] test 21024 set_posix_access: Created SD-Size: 200
40 26359 [main] test 21024 fhandler_pty_slave::open: (393): pty output_mutex (0x144): waiting -1 ms
46 26405 [main] test 21024 fhandler_pty_slave::open: (393): pty output_mutex: acquired
51 26456 [main] test 21024 tty::create_inuse: cygtty.slave_alive.4 0x154
42 26498 [main] test 21024 fhandler_pty_slave::open: (396): pty output_mutex(0x144) released
91 26589 [main] test 21024 open_shared: name cygpid.19840, n 19840, shared 0x150000 (wanted 0x0), h 0x158, *m 6
52 26641 [main] test 21024 fhandler_pty_slave::open: dup handles directly since I'm the owner
64 26705 [main] test 21024 fhandler_pty_slave::open: duplicated from_master 0x3C8->0x158 from pty_owner
45 26750 [main] test 21024 fhandler_pty_slave::open: duplicated to_master 0x3D4->0x160 from pty_owner
41 26791 [main] test 21024 fhandler_pty_slave::open: duplicated to_master_cyg 0x3DC->0x164 from pty_owner
73 26864 [main] test 21024 fhandler_console::need_invisible: invisible_console 0
48 26912 [main] test 21024 fhandler_base::open_with_arch: line 458: /dev/pty4 usecount + 1 = 1
43 26955 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
43 26998 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
59 27057 [main] test 21024 fhandler_base::set_flags: filemode set to binary
60 27117 [main] test 21024 _pinfo::set_ctty: old no ctty, ctty device number 0xFFFFFFFF, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
45 27162 [main] test 21024 _pinfo::set_ctty: cygheap->ctty 0x0, archetype 0x1803077A0
41 27203 [main] test 21024 _pinfo::set_ctty: ctty was NULL
41 27244 [main] test 21024 _pinfo::set_ctty: line 497: /dev/pty4 usecount + 1 = 2
43 27287 [main] test 21024 _pinfo::set_ctty: /dev/pty4 ctty, usecount 2
59 27346 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 21024, pid 21024, pgid 21024, tty->pgid 20196, tty->sid 19636
55 27401 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
45 27446 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 2
44 27490 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
40 27530 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
40 27570 [main] test 21024 fhandler_base::set_flags: filemode set to binary
41 27611 [main] test 21024 _pinfo::set_ctty: old ctty /dev/pty4, ctty device number 0x880004, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
43 27654 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 19636, pid 21024, pgid 20196, tty->pgid 20196, tty->sid 19636
43 27697 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
41 27738 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 2
99 27837 [main] test 21024 build_fh_pc: found an archetype for (null)(136/4) io_handle 0x158
42 27879 [main] test 21024 build_fh_pc: fh 0x180307B80, dev 00880004
44 27923 [main] test 21024 fhandler_base::open_with_arch: line 478: /dev/pty4 usecount + 1 = 3
42 27965 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
39 28004 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
40 28044 [main] test 21024 fhandler_base::set_flags: filemode set to binary
40 28084 [main] test 21024 _pinfo::set_ctty: old ctty /dev/pty4, ctty device number 0x880004, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
43 28127 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 19636, pid 21024, pgid 20196, tty->pgid 20196, tty->sid 19636
43 28170 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
41 28211 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 3
41 28252 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
41 28293 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
40 28333 [main] test 21024 fhandler_base::set_flags: filemode set to binary
41 28374 [main] test 21024 _pinfo::set_ctty: old ctty /dev/pty4, ctty device number 0x880004, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
42 28416 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 19636, pid 21024, pgid 20196, tty->pgid 20196, tty->sid 19636
40 28456 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
41 28497 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 3
96 28593 [main] test 21024 build_fh_pc: found an archetype for (null)(136/4) io_handle 0x158
42 28635 [main] test 21024 build_fh_pc: fh 0x180307EF0, dev 00880004
44 28679 [main] test 21024 fhandler_base::open_with_arch: line 478: /dev/pty4 usecount + 1 = 4
42 28721 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
38 28759 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
40 28799 [main] test 21024 fhandler_base::set_flags: filemode set to binary
40 28839 [main] test 21024 _pinfo::set_ctty: old ctty /dev/pty4, ctty device number 0x880004, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
42 28881 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 19636, pid 21024, pgid 20196, tty->pgid 20196, tty->sid 19636
41 28922 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
41 28963 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 4
42 29005 [main] test 21024 fhandler_base::set_flags: flags 0x10002, supplied_bin 0x0
40 29045 [main] test 21024 fhandler_base::set_flags: O_TEXT/O_BINARY set in flags 0x10000
40 29085 [main] test 21024 fhandler_base::set_flags: filemode set to binary
40 29125 [main] test 21024 _pinfo::set_ctty: old ctty /dev/pty4, ctty device number 0x880004, tc.ntty device number 0x880004 flags & O_NOCTTY 0x0
44 29169 [main] test 21024 _pinfo::set_ctty: attaching ctty /dev/pty4 sid 19636, pid 21024, pgid 20196, tty->pgid 20196, tty->sid 19636
43 29212 [main] test 21024 _pinfo::set_ctty: cygheap->ctty now 0x1803077A0, archetype 0x1803077A0
43 29255 [main] test 21024 fhandler_pty_slave::open_setup: /dev/pty4 opened, usecount 4
498 29753 [main] test 21024 __set_errno: void dll_crt0_1(void*):992 setting errno 0
552 30305 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
106 30411 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
141 30552 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
157 30709 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
145 30854 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
157 31011 [main] test 21024 __get_lcid_from_locale: LCID=0x0809
953 31964 [main] test 21024 close: close(1)
42 32006 [main] test 21024 fhandler_base::close_with_arch: line 1129: /dev/pty4 usecount + -1 = 3
41 32047 [main] test 21024 fhandler_base::close_with_arch: not closing archetype
41 32088 [main] test 21024 close: 0 = close(1)
466 32554 [main] test 21024 close: close(2)
43 32597 [main] test 21024 fhandler_base::close_with_arch: line 1129: /dev/pty4 usecount + -1 = 2
41 32638 [main] test 21024 fhandler_base::close_with_arch: not closing archetype
40 32678 [main] test 21024 close: 0 = close(2)
324 33002 [main] test 21024 do_exit: do_exit (256), exit_state 1
40 33042 [main] test 21024 void: 0x0 = signal (20, 0x1)
41 33083 [main] test 21024 void: 0x0 = signal (1, 0x1)
41 33124 [main] test 21024 void: 0x0 = signal (2, 0x1)
40 33164 [main] test 21024 void: 0x0 = signal (3, 0x1)
42 33206 [main] test 21024 fhandler_base::close_with_arch: line 1129: /dev/pty4 usecount + -1 = 1
41 33247 [main] test 21024 fhandler_base::close_with_arch: not closing archetype
40 33287 [main] test 21024 init_cygheap::close_ctty: closing cygheap->ctty 0x1803077A0
40 33327 [main] test 21024 fhandler_base::close_with_arch: closing passed in archetype 0x0, usecount 0
42 33369 [main] test 21024 fhandler_pty_slave::cleanup: /dev/pty4 closed, usecount 0
40 33409 [main] test 21024 fhandler_pty_slave::close: closing last open /dev/pty4 handle
56 33465 [main] test 21024 fhandler_console::free_console: freed console, res 1
43 33508 [main] test 21024 fhandler_pty_common::close: pty4 closing
43 33551 [main] test 21024 dtable::delete_archetype: deleting element 0 for /dev/pty4(136/4)
46 33597 [main] test 21024 getpid: 21024 = getpid()
42 33639 [main] test 21024 proc_terminate: nprocs 0
40 33679 [main] test 21024 proc_terminate: leaving
51 33730 [main] test 21024 pinfo::exit: Calling ExitProcess n 0x100, exitcode 0x1
--- Process 21024 thread 15896 exited with status 0x1
--- Process 21024 thread 5380 exited with status 0x1
--- Process 21024 thread 21328 exited with status 0x1
--- Process 21024 thread 21296 exited with status 0x1
--- Process 21024 exited with status 0x1

Clojure - add file to the classpath

How do I add resources (preferably programmatically) to the classpath of my program ?
I am using compojure.route.resources like the following :
A route for serving resources on the classpath. Accepts the following
keys: :root - the root prefix path of the resources, defaults
to 'public' :mime-types - an optional map of file extensions to mime
types
(defroutes routes
(resources "/js" {:root "js"})
(resources "/css" {:root "css"}))
Now I would like to add files to be served, but I don't know where to generate them.
Note : in case it matters, I am using boot and the example is taken from this template.
In regular boot based project, you can have a resources folder at the root:
-rw-r--r--# 1 niko staff 173 Dec 18 10:19 boot.properties
-rw-r--r--# 1 niko staff 2796 Dec 30 09:55 build.boot
drwxr-xr-x# 17 niko staff 578 Dec 30 10:49 resources
drwxr-xr-x# 4 niko staff 136 Nov 16 09:52 src
drwxr-xr-x# 17 niko staff 578 Jan 14 11:50 target
In that folder you can create the css and the js folder and include your files there:
drwxr-xr-x# 5 niko staff 170 Dec 14 15:33 resources/css/
drwxr-xr-x# 4 niko staff 136 Nov 30 18:01 resources/js/