Hi Lee,
Thanks for your response in valuable time .
I'll drop the idea of creating capistrano deployment logs from shell script
..
What is the other way to get logs of capistrano kindly guide us . will be
help full
On Tuesday, February 24, 2015 at 9:15:22 PM UTC+5:30, Lee Hambley wrote:
>
> I suspected bad IO redirection (you're sending stdout to stderr, and then
> piping the result to tee, which I expected would just forward the empty
> stdout, since everything ran into stderr) but I tried it and I can't
> reproduce your problem:
> https://gist.github.com/leehambley/c253d7738797c3aee305
>
> Conclusion: It's not a Capistrano problem.
>
> Some unix commands behave strangely with streams, imagine the following
> case:
>
> time ./somecommand > afileondisk
>
> Even though, in theory you've piped the output of time, and ./somecommand
> to the file on disk, in actual fact `time` does special stuff to reopen
> handles for stdout/err to the real controlling terminal (I couldn't find a
> reference, but I learned about it in a DestroyAllSoftware screencast,
> unfortunately behind a paywall)
>
> I believe, especially having read
> http://stackoverflow.com/questions/692000/how-do-i-write-stderr-to-a-file-while-using-tee-with-a-pipe
>
> that tee seems to do something similar.
>
> Lee Hambley
> http://lee.hambley.name/
> +49 (0) 170 298 5667
>
> On 24 February 2015 at 16:10, junior <[email protected] <javascript:>>
> wrote:
>
>> HI Lee,
>> The problem is if 2>&1 after pipe symbol there is no out put
>> .. It was getting stuck ... the problem exactly is when i apply pipe symbol
>> . In my old version capistrano same script is working .
>>
>>
>>
>> $CAPEXE $1 $2 1>&2 | tee >( grep -v '** \[err ::' > $CAPOUTFILE ) >(
>> egrep "** \[err ::|rolling back|Not a valid URL" > $CAPERRFILE)
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tuesday, February 24, 2015 at 5:13:37 PM UTC+5:30, junior wrote:
>>>
>>> Hi All ,
>>> Im new to this capistrano , rails project .
>>>
>>> I have one issue . while deploy rails code with capistrano i can able to
>>> see the logs in terminal .
>>> But unable to print into a file ...
>>>
>>> i have tried linux native method
>>>
>>> cmd > output.log not working
>>> cmd 2>&1 | tee also not working...
>>>
>>> Which is the best way to capture capistrano stadard output & error
>>> redirect into an file
>>>
>>> Thanks in advance .
>>>
>>>
>>>
>>> ruby version = ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
>>> cap version = Capistrano Version: 3.3.5 (Rake Version: 10.4.2)
>>> os -= centos 6.5 64bit
>>> gem version = 2.4.5
>>>
>>>
>>>
>>>
>>>
>>>
>>> Versions:
>>>
>>> - Ruby
>>> - Capistrano
>>> - Rake / Rails / etc
>>>
>>> Platform:
>>>
>>> - Working on....
>>> - Deploying to...
>>>
>>> Logs:
>>>
>>> - Please past logs (as completely as possible to a 3rd party pasting
>>> service such as pastie.org)
>>>
>>> Files:
>>>
>>> - Capfile
>>> - deploy.rb
>>> - Stage files (production.rb, staging.rb)
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Capistrano" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web, visit
>> https://groups.google.com/d/msgid/capistrano/df260101-8938-4290-a4ae-6086104e2503%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/capistrano/df260101-8938-4290-a4ae-6086104e2503%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/capistrano/4b4a3b5b-3a11-4318-b1df-aceff53feae7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.